kashav / point Goto Github PK
View Code? Open in Web Editor NEWShorten URLs with GitHub repositories and the http-equiv attribute.
License: MIT License
Shorten URLs with GitHub repositories and the http-equiv attribute.
License: MIT License
Currently the tool uses my own repositories. This has the disatvantage of cluttering the public repository list with 'shortened' urls. This problem could be migitated if it were possible to use an organization to store the shortened urls in instead.
Currently, the point list
command displays a list of url redirects from local cache (i.e. entries created by point
, stored in state.Log.Entries
).
However, it might not be the actual list of urls from github page.
That could either be caused by:
point
from other computerpoint
(e.g. point
thought it created an entry online while the actual Github page did not has that entry)Let say I ran this command multiple time:
$ point create -s -r foo/bar -n shorturl "http://something"
It will succeed the first time and command failed after the first execution, which is okay. (failed because there is nothing to commit in git)
(But ideally it should notify the user that the same entry already exists)
Starting fresh. The problem lies on if I run:
$ point create -s -r foo/bar -n shorturl "http://something"
$ point create -s -r foo/bar -n shorturl "http://somethingelse"
$ point create -s -r foo/bar -n shorturl "http://something"
$ point create -s -r foo/bar -n shorturl "http://somethingelse"
it will succeed everytime because it was able to update the repo successfully, which is okay too.
(Ideally it should notify the user that it has updated an existing entry)
But if I then run point list
it will shows:
$ point list
1) foo/bar -> http://something
2) foo/bar -> http://somethingelse
3) foo/bar -> http://something
4) foo/bar -> http://somethingelse
while the actual repo only has one folder named bar/shorturl
(i.e. github.com/foo/bar/shorturl). It's because state.Log.Entries
has desynced from the actual repo.
A solution might be add an option to sync with the repo, something like
point list -s -r foo/bar --sync
which iterate the folders, looking for some token to know that it's a shorten url, and update its state.Log.Entries
accordingly. Which should then show something like:
$ point list -s -r foo/bar --sync
1) foo/bar -> http://somethingelse
and thereafter.
Of course, this is only covering the subdirectory case and I'm not sure how to go about on the createNewRepo case (which would be expensive to loop through all repos)
Instead of making new repositories, I think it should be possible to create subdirectories in the main GitHub page repo (e.g. arkon.github.io/haiG89h/index.html).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.