farmckon / gitmarks_2 Goto Github PK
View Code? Open in Web Editor NEWGitmarks 2.0. is a peer to peer bookmarking tool.
Home Page: http://farmckon.github.com/gitmarks_2
Gitmarks 2.0. is a peer to peer bookmarking tool.
Home Page: http://farmckon.github.com/gitmarks_2
======== Gitmarks ======== Gitmarks is: * A peer to peer web bookmark manager. This tool is a way to privately share bookmarks to your friends, without using a centralized server. * A local webpage cache system, so you can track websites over time, and keep copies of old content, along with an md5 hash, and other metadata to verify that the page is what you expect/know. * A tool to pull bookmarks from a system like Delicious, and save them into gitmarks, so you do not lose existing bookmarks you may have saved in other systems. ======= Quickstart: ======= 1) Download gitmarks: The best way is to get it via git. Browse to a diretory to install it in, and run: 'git clone git://github.com/FarMcKon/gitmarks_2.git' 2) Run setup: To setup what repository system you want to use for storing your gitmarks, you will need to run the setup program. You can do that at the command line (in your gitmarks code directory) by running. 'python config.py' You will be promoted to create a github account and directories if you use defaults. 3) Start adding bookmarks! You can import your delicious bookmarks via 'python delicious_import.py' Or you can add bookmarks directly at the command line by running 'gitmark.py [options] uri' ==== Details ==== Gitmarks uses 2 git repositories for your bookmarks. One stores public bookmarks (called 'public' ) and the second stores private bookmarks ( called 'private') a 3rd optional repository 'cache' can be used to store a local cache of all of your bookmark files. The cache will be update <TBD> Each time you bookmark a URL gitmarks will: - Create a bookmark file from the bookmark and tags - Generate a bit of bookmark metadata (you can tweak how much) in the 'tags' directory. - Cache a local file of that page (if you have cache enabled) - If you have more than 20 un-committed changes, gitmarks will commit those changes to the local repository. - If you bookmark something to a person, it will send your bookmark (unencrypted for now) to that person. You can use git as usual to see who committed what and when, or you can grep your way to bookmark happiness on the command line. It's great for groups to collaboratively collect bookmarks in one spot (thanks to git itself!) ===== Usage ===== python gitmark_add.py [url] options: -p = do not push to origin (store bookmark locally only) -m = description of the bookmark -t = a comma-delimited list of tags Example: python gitmark.py -m 'my site' -t me,hilary_mason,code,bookmarks http://www.hilarymason.com =============== OMG Delicious?! =============== Yes, you can import your delicious bookmarks! Usage: python delicious_import.py [username] [password] (be patient if you have a lot of them.) ============================= Using the Browser Bookmarklet ============================= First, run the gitmark_web server: python gitmark_web.py Then, go to the following URL and drag the bookmarklet into your browser's toolbar: http://localhost:44865/ (where 44865 is the port you set in settings.py) ======= License ======= Copyright 2011 Far McKon. Based on code that is Copyright 2010 Hilary Mason. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
When importing from delicious, the gitmark_add.py script chokes on an UTF-8 character (µ) in a tag:
adding mark None to repo False
{
"extended": "",
"hash": "....",
"description": "micro-OSC | CNMAT",
"rights": null,
"creator": "delicious:user",
"uri": "http://cnmat.berkeley.edu/research/uosc",
"private": false,
"meta": "....",
"time": "2009-02-23T00:07:07Z",
"tags": [
"osc",
"\u00b5c",
"tm",
"pic"
]
}
osc
[u'osc']
µc
[u'osc', u'\xb5c']
tm
[u'osc', u'\xb5c', u'tm']
pic
[u'osc', u'\xb5c', u'tm', u'pic']
tags filename/Users/ja/Documents/gitmarks/public/tags/osc
tags filename/Users/ja/Documents/gitmarks/public/tags/tm
tags filename/Users/ja/Documents/gitmarks/public/tags/pic
Traceback (most recent call last):
File "./delicious_import.py", line 158, in <module>
import_delicious_to_local_git(username, password)
File "./delicious_import.py", line 108, in import_delicious_to_local_git
err = addToRepo(mark,doPush=False)
File ".../gitmarks_2/gitmark_add.py", line 107, in addToRepo
return addToPublicRepo(gitmarksObj, doPush)
File ".../gitmarks_2/gitmark_add.py", line 159, in addToPublicRepo
print 'tags filename' + str(filename)
Find 5 people who will spend an hour once a month testing this stuff.
Running gitmark_web.py results in the following error when browsing to the host/port:
Error 500: Internal Server Error
Sorry, the requested URL http://localhost:44865/ caused an error:
Template 'index' not found.
I can't seem to locate any templates in the git repos
Test creating a new gitmarks without having a remote repository to check your bookmarks into.
Tags in the public/tags/NAME directory are not being added to local git repository (aka 'git add NAME' is noto called). This needs to be tested, verified, fixed, etc.
Write a set of automated command line tests for adding data to a repository.
I'm going to go ahead and try converting the code on a file-by-file basis to conform to the PEP8 standards. I don't think we need to be 100% compliant, but more is better. Also, I'm going to be using the awesome PEP8 script to check the code.
gitmark_web.py has 'from gitmark import gitMark' in it, whereas the class name is gitmark
We have gitmarks.org, we need a 3-4 page website
Mostly, links to offsite resources like github and OpenHatch
Design a mechanism for browsing other people's links
settings object is being imported from example_settings.py and when reloaded is being reloaded from the example and wiping out settings.
As well it looks like for some reason the settings for (at least) the remote public repo is not being remembered as I can't get it to clone the remote repo (or get by the if guard) as its setting is None at this point.
Working on trying to figure it out. Ordering a book...."Learning Python: The Hard Way"
Test doing a ./config.py with having remote git repositories to work from.
Design a system for extracting content from URLs and not just crawling the raw HTML
File "config.py", line 200
dict = { 'GITMARK_BASE_DIR':base_dir, 'GET_CONTENT':get_content,
^
IndentationError: unexpected indent
in ff_plugin we have a firefox plug example. We need to test it as-is and decide how to turn it into a full bookmark manager.
I can't seem to get the settings I enter via the command line via config.py prompts to ever actually take effect.
The problem is that the function reload() is used and passed the argument settings. The example_settings.py is imported as settings so trying to load settings.py just loads the local settings module (actually example_settings.py).
Also, reload() is meant to be used for a module that is already loaded. In this case, the settings.py module should not already be loaded since we just created this file via the config prompts.
Crawl OpenHatch to get these issues to show up in it's revision system.
Find contributors to work on this project, people who want to donate code.
I'm sure there are a lot more out-of-date issues in the README, but the most crucial one is that it shows usage information, etc. for gitmark.py, which looks like it was renamed to gitmark_add.py.
From the README:
"""
3) Start adding bookmarks!
You can import your delicious bookmarks via
'python delicious_imports.py'
Or you can add bookmarks directly at the command line by running
'gitmark.py [options] uri'
"""
Hey,
when i try to run the webserver, i get a 500 error in the browser
`Error 500: Internal Server Error
Sorry, the requested URL http://localhost:44865/ caused an error:
Template 'index' not found.`
extend config to create private/public keys if they do not exist
Document how config.py works so a new developer can follow what it does and how it works.
Design a mechanism to share URLs with other people. Probably via subpubhubbub
Right now it is unlikely that config.py downloads all required packages. config.py needs to be tested on a machine to see if it does indeed download all related files/projects.
When I agree with the default options from config.py, the following error occurs:
Traceback (most recent call last):
File "config.py", line 324, in <module>
configure_gitmarks()
File "config.py", line 44, in configure_gitmarks
ret = create_local_gitmarks_folders()
File "config.py", line 134, in create_local_gitmarks_folders
os.chdir(os.path.abspath(content_dir))
OSError: [Errno 2] No such file or directory: '/Users/Joris/tmp/gitmarks_2/content'
When I manually create the content directory before running config.py, I get some warnings about content already existing, but everything works fine. This is on Mac OS X, with python 2.6.3 from EPD.
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.