Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge 0.2 release final

  • Loading branch information...
commit 6e0e4e5acd2d1e042993679589ff788e379ddb3b 2 parents b2245b4 + 8031fe3
@mitechie authored
Showing with 7,903 additions and 5,983 deletions.
  1. +0 −4 Bookie/README.txt
  2. +0 −367 Bookie/bookie/models/__init__.py
  3. +0 −112 Bookie/bookie/models/fulltext.py
  4. +0 −80 Bookie/bookie/routes.py
  5. +0 −198 Bookie/bookie/static/css/bookie.css
  6. BIN  Bookie/bookie/static/favicon.ico
  7. BIN  Bookie/bookie/static/footerbg.png
  8. BIN  Bookie/bookie/static/headerbg.png
  9. +0 −8 Bookie/bookie/static/ie6.css
  10. BIN  Bookie/bookie/static/middlebg.png
  11. +0 −65 Bookie/bookie/static/pylons.css
  12. BIN  Bookie/bookie/static/pyramid-small.png
  13. BIN  Bookie/bookie/static/pyramid.png
  14. BIN  Bookie/bookie/static/transparent.gif
  15. +0 −96 Bookie/bookie/templates/bmark/func.mako
  16. +0 −22 Bookie/bookie/templates/bmark/recent.mako
  17. +0 −49 Bookie/bookie/templates/main_wrap.mako
  18. +0 −25 Bookie/bookie/templates/tag/bmarks.mako
  19. +0 −45 Bookie/bookie/tests/__init__.py
  20. 0  Bookie/bookie/tests/test_utils/__init__.py
  21. +0 −90 Bookie/bookie/tests/test_utils/test_fulltext.py
  22. +0 −7 Bookie/bookie/views/__init__.py
  23. +0 −70 Bookie/bookie/views/bmarks.py
  24. +0 −49 Bookie/bookie/views/tags.py
  25. +0 −82 Bookie/bookie/views/utils.py
  26. +0 −130 Bookie/docs/Makefile
  27. +0 −32 Bookie/docs/chrome.rst
  28. +0 −4 Bookie/docs/firefox.rst
  29. +0 −42 Bookie/docs/index.rst
  30. +0 −79 Bookie/docs/started.rst
  31. +0 −34 Bookie/docs/user.rst
  32. +0 −27 Bookie/extensions/chrome_ext/background.html
  33. +0 −269 Bookie/extensions/chrome_ext/bookie-core.js
  34. BIN  Bookie/extensions/chrome_ext/delicious.png
  35. +0 −2  Bookie/extensions/firefox_ext/chrome.manifest
  36. +0 −7 Bookie/extensions/firefox_ext/chrome/content/bookie.xul
  37. +0 −6 Bookie/fabfile/tests.py
  38. +0 −4 Bookie/migrations/README
  39. 0  Bookie/migrations/__init__.py
  40. +0 −35 Bookie/migrations/versions/005_add_default_bookmark_of_bookie_site.py
  41. 0  Bookie/migrations/versions/__init__.py
  42. 0  {Bookie → }/CHANGES.txt
  43. 0  {Bookie → }/COPYING
  44. +1 −0  {Bookie → }/CREDITS.txt
  45. +7 −0 INSTALL.txt
  46. 0  {Bookie → }/MANIFEST.in
  47. +6 −19 README.rst
  48. +1 −0  {Bookie → }/bookie/__init__.py
  49. 0  {Bookie → }/bookie/lib/__init__.py
  50. 0  {Bookie → }/bookie/lib/access.py
  51. 0  {Bookie → }/bookie/lib/importer.py
  52. +172 −0 bookie/lib/readable.py
  53. +602 −0 bookie/models/__init__.py
  54. +190 −0 bookie/models/fulltext.py
  55. +111 −0 bookie/routes.py
  56. +393 −0 bookie/static/css/bookie.css
  57. BIN  bookie/static/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png
  58. BIN  bookie/static/css/custom-theme/images/ui-bg_flat_75_ffffff_40x100.png
  59. BIN  bookie/static/css/custom-theme/images/ui-bg_glass_55_fbf9ee_1x400.png
  60. BIN  bookie/static/css/custom-theme/images/ui-bg_glass_65_ffffff_1x400.png
  61. BIN  bookie/static/css/custom-theme/images/ui-bg_glass_75_dadada_1x400.png
  62. BIN  bookie/static/css/custom-theme/images/ui-bg_glass_75_e6e6e6_1x400.png
  63. BIN  bookie/static/css/custom-theme/images/ui-bg_highlight-soft_75_363d52_1x100.png
  64. BIN  bookie/static/css/custom-theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png
  65. BIN  bookie/static/css/custom-theme/images/ui-icons_222222_256x240.png
  66. BIN  bookie/static/css/custom-theme/images/ui-icons_2e83ff_256x240.png
  67. BIN  bookie/static/css/custom-theme/images/ui-icons_454545_256x240.png
  68. BIN  bookie/static/css/custom-theme/images/ui-icons_888888_256x240.png
  69. BIN  bookie/static/css/custom-theme/images/ui-icons_cd0a0a_256x240.png
  70. BIN  bookie/static/css/custom-theme/images/ui-icons_eeeeee_256x240.png
  71. +425 −0 bookie/static/css/custom-theme/jquery-ui-1.8.12.custom.css
  72. BIN  bookie/static/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  73. BIN  bookie/static/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
  74. BIN  bookie/static/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
  75. BIN  bookie/static/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
  76. BIN  bookie/static/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
  77. BIN  bookie/static/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
  78. BIN  bookie/static/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
  79. BIN  bookie/static/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
  80. BIN  bookie/static/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
  81. BIN  bookie/static/css/ui-lightness/images/ui-icons_222222_256x240.png
  82. BIN  bookie/static/css/ui-lightness/images/ui-icons_228ef1_256x240.png
  83. BIN  bookie/static/css/ui-lightness/images/ui-icons_ef8c08_256x240.png
  84. BIN  bookie/static/css/ui-lightness/images/ui-icons_ffd27a_256x240.png
  85. BIN  bookie/static/css/ui-lightness/images/ui-icons_ffffff_256x240.png
  86. +347 −0 bookie/static/css/ui-lightness/jquery-ui-1.8.11.custom.css
  87. BIN  bookie/static/favicon.ico
  88. BIN  bookie/static/images/logo.128.png
  89. +137 −0 bookie/static/images/logo.128.svg
  90. BIN  bookie/static/images/logo.16.png
  91. +122 −0 bookie/static/js/bookie.js
  92. +259 −0 bookie/static/js/lib/jquery-ui-1.8.12.custom.min.js
  93. +1 −0  bookie/static/js/lib/jquery-ui.min.js
  94. 0  {Bookie/extensions/chrome_ext → bookie/static/js/lib}/jquery.min.js
  95. +106 −0 bookie/static/tagfield/superbly-tagfield.css
  96. +293 −0 bookie/static/tagfield/superbly-tagfield.js
  97. +1 −1  {Bookie → }/bookie/templates/bmark/confirm_delete.mako
  98. +168 −0 bookie/templates/bmark/func.mako
  99. +22 −0 bookie/templates/bmark/popular.mako
  100. +12 −0 bookie/templates/bmark/readable.mako
  101. +29 −0 bookie/templates/bmark/recent.mako
  102. +2 −2 {Bookie → }/bookie/templates/delapi/posts_get.mako
  103. +7 −0 bookie/templates/delapi/tags_complete.mako
  104. 0  {Bookie → }/bookie/templates/exceptions/403.mako
  105. 0  {Bookie → }/bookie/templates/exceptions/404.mako
  106. +71 −0 bookie/templates/main_wrap.mako
  107. +27 −0 bookie/templates/tag/bmarks.mako
  108. +9 −0 bookie/templates/tag/bmarks_wrap.mako
  109. +1 −1  {Bookie → }/bookie/templates/tag/list.mako
  110. 0  {Bookie → }/bookie/templates/testmako.mako
  111. +1 −1  {Bookie → }/bookie/templates/utils/export.mako
  112. +3 −0  {Bookie → }/bookie/templates/utils/import.mako
  113. +1 −3 {Bookie → }/bookie/templates/utils/results.mako
  114. +13 −0 bookie/templates/utils/results_wrap.mako
  115. +28 −0 bookie/templates/utils/search.mako
  116. +81 −0 bookie/tests/__init__.py
  117. 0  {Bookie → }/bookie/tests/test_api/__init__.py
  118. +80 −28 {Bookie → }/bookie/tests/test_delicious/__init__.py
  119. 0  {pylons/bookie/tests/models → bookie/tests/test_utils}/__init__.py
  120. 0  {Bookie → }/bookie/tests/test_utils/delicious.html
  121. 0  {Bookie → }/bookie/tests/test_utils/googlebookmarks.html
  122. +1 −2  {Bookie → }/bookie/tests/test_utils/massive.xml
  123. +181 −0 bookie/tests/test_utils/readable_sample.html
  124. +65 −0 bookie/tests/test_utils/test_export.py
  125. +174 −0 bookie/tests/test_utils/test_fulltext.py
  126. +11 −6 {Bookie → }/bookie/tests/test_utils/test_imports.py
  127. +170 −0 bookie/tests/test_utils/test_readable.py
  128. +5 −2 {Bookie → }/bookie/tests/test_webviews/__init__.py
  129. +9 −0 bookie/views/__init__.py
  130. +153 −0 bookie/views/bmarks.py
  131. +57 −8 {Bookie → }/bookie/views/delapi.py
  132. 0  {Bookie → }/bookie/views/exceptions.py
  133. +75 −0 bookie/views/tags.py
  134. +168 −0 bookie/views/utils.py
  135. 0  {pylons → }/docs/Makefile
  136. +2 −2 {Bookie → }/docs/conf.py
  137. 0  {Bookie → }/docs/database.rst
  138. +32 −0 docs/development.rst
  139. +22 −0 docs/events.rst
  140. +72 −0 docs/extensions.rst
  141. 0  {Bookie → }/docs/fabric.rst
  142. +89 −0 docs/features.rst
  143. +17 −13 {Bookie → }/docs/hosting.rst
  144. +59 −0 docs/index.rst
  145. +56 −0 docs/install.rst
  146. +101 −0 docs/started.rst
  147. 0  {Bookie → }/docs/tests.rst
  148. +3 −4 {Bookie → }/docs/todo.rst
  149. +80 −0 docs/user.rst
  150. +53 −0 extensions/chrome_ext/background.html
  151. +52 −15 {Bookie → }/extensions/chrome_ext/bookie-chrome.js
  152. +373 −0 extensions/chrome_ext/bookie-core.js
  153. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png
  154. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-bg_flat_75_ffffff_40x100.png
  155. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-bg_glass_55_fbf9ee_1x400.png
  156. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-bg_glass_65_ffffff_1x400.png
  157. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-bg_glass_75_dadada_1x400.png
  158. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-bg_glass_75_e6e6e6_1x400.png
  159. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-bg_highlight-soft_75_363d52_1x100.png
  160. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png
  161. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-icons_222222_256x240.png
  162. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-icons_2e83ff_256x240.png
  163. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-icons_454545_256x240.png
  164. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-icons_888888_256x240.png
  165. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-icons_cd0a0a_256x240.png
  166. BIN  extensions/chrome_ext/lib/css/custom-theme/images/ui-icons_eeeeee_256x240.png
  167. +425 −0 extensions/chrome_ext/lib/css/custom-theme/jquery-ui-1.8.12.custom.css
  168. +259 −0 extensions/chrome_ext/lib/jquery-ui.min.js
  169. +16 −0 extensions/chrome_ext/lib/jquery.min.js
  170. +106 −0 extensions/chrome_ext/lib/tagfield/superbly-tagfield.css
  171. +293 −0 extensions/chrome_ext/lib/tagfield/superbly-tagfield.js
  172. BIN  extensions/chrome_ext/logo.128.png
  173. BIN  extensions/chrome_ext/logo.16.png
  174. +2 −2 {Bookie → }/extensions/chrome_ext/manifest.json
  175. +20 −3 {Bookie → }/extensions/chrome_ext/options.html
  176. +58 −6 {Bookie → }/extensions/chrome_ext/popup.html
  177. +4 −0 extensions/chrome_ext/readable.js
  178. +13 −0 extensions/firefox_ext/TODO
  179. +84 −0 extensions/firefox_ext/bookie.xul
  180. +9 −0 extensions/firefox_ext/chrome.manifest
  181. +84 −0 extensions/firefox_ext/chrome/content/bookie.xul
  182. +1 −0  extensions/firefox_ext/chrome/content/js/bookie-core.js
  183. +204 −0 extensions/firefox_ext/chrome/content/js/bookie-firefox.js
  184. +1 −0  extensions/firefox_ext/chrome/content/js/jquery-ui.min.js
  185. +1 −0  extensions/firefox_ext/chrome/content/js/jquery.min.js
  186. +24 −0 extensions/firefox_ext/chrome/content/options.xul
  187. BIN  extensions/firefox_ext/chrome/skin/osx/36_23.png
  188. +20 −0 extensions/firefox_ext/chrome/skin/osx/bookie.css
  189. +1 −0  extensions/firefox_ext/chrome/skin/osx/logo.16.png
  190. BIN  extensions/firefox_ext/chrome/skin/unix/24px.png
  191. +54 −0 extensions/firefox_ext/chrome/skin/unix/bookie.css
  192. +1 −0  extensions/firefox_ext/chrome/skin/unix/logo.16.png
  193. +9 −0 extensions/firefox_ext/defaults/preferences/defaults.js
  194. +8 −7 {Bookie → }/extensions/firefox_ext/install.rdf
  195. 0  {Bookie → }/extensions/tests/chrome_tests.js
  196. +12 −1 {Bookie → }/extensions/tests/index.html
  197. +31 −0 extensions/tests/ptests.js
  198. 0  {Bookie → }/extensions/tests/qunit.css
  199. 0  {Bookie → }/extensions/tests/qunit.js
  200. +31 −2 {Bookie → }/extensions/tests/tests.js
  201. +12 −3 {Bookie → }/fabfile/__init__.py
  202. +55 −0 {Bookie → }/fabfile/database.py
  203. +11 −10 {Bookie → }/fabfile/development.py
  204. +2 −2 {Bookie → }/fabfile/docs.py
  205. 0  {Bookie → }/fabfile/sample.ini
  206. +17 −0 fabfile/tests.py
  207. +0 −2  {Bookie → }/fabfile/utils.py
  208. 0  {pylons/bookie → }/migrations/README
  209. 0  {pylons/bookie/tests/functional → migrations}/__init__.py
  210. 0  {Bookie → }/migrations/manage.py
  211. 0  {Bookie → }/migrations/migrate.cfg
  212. 0  {Bookie → }/migrations/versions/001_Initial_bmark_table.py
  213. 0  {Bookie → }/migrations/versions/002_Add_tags_table.py
  214. 0  {Bookie → }/migrations/versions/003_Add_date_cols_to_bmarks.py
  215. 0  {Bookie → }/migrations/versions/004_add_fulltext_table.py
  216. +133 −0 migrations/versions/005_add_url_hash_table.py
  217. +93 −0 migrations/versions/006_add_readable_table.py
  218. 0  {pylons/bookie → }/migrations/versions/__init__.py
  219. 0  {Bookie → }/pylintrc
  220. +0 −3  pylons/MANIFEST.in
  221. +0 −100 pylons/bookie/__init__.py
  222. 0  pylons/bookie/config/__init__.py
  223. +0 −63 pylons/bookie/config/deployment.ini
  224. +0 −63 pylons/bookie/config/deployment.ini_tmpl
  225. +0 −54 pylons/bookie/config/environment.py
  226. +0 −90 pylons/bookie/config/middleware.py
  227. +0 −54 pylons/bookie/config/routing.py
  228. 0  pylons/bookie/controllers/__init__.py
  229. +0 −219 pylons/bookie/controllers/accounts.py
  230. +0 −36 pylons/bookie/controllers/d1.py
  231. +0 −44 pylons/bookie/controllers/error.py
  232. BIN  pylons/bookie/development.db
  233. +0 −130 pylons/bookie/docs/Makefile
  234. +0 −2  pylons/bookie/docs/__init__.py
  235. +0 −216 pylons/bookie/docs/conf.py
  236. +0 −20 pylons/bookie/docs/index.rst
  237. +0 −155 pylons/bookie/docs/make.bat
  238. 0  pylons/bookie/lib/__init__.py
  239. +0 −18 pylons/bookie/lib/app_globals.py
  240. +0 −31 pylons/bookie/lib/base.py
  241. +0 −7 pylons/bookie/lib/helpers.py
  242. 0  pylons/bookie/migrations/__init__.py
  243. +0 −4 pylons/bookie/migrations/manage.py
  244. +0 −20 pylons/bookie/migrations/migrate.cfg
  245. +0 −99 pylons/bookie/migrations/versions/001_Initial_auth_db.py
  246. +0 −58 pylons/bookie/migrations/versions/001_Initial_tables.py
  247. +0 −30 pylons/bookie/migrations/versions/002_Tag_count_triggers.py
  248. +0 −30 pylons/bookie/model/__init__.py
  249. +0 −162 pylons/bookie/model/auth.py
  250. +0 −56 pylons/bookie/model/bookmarks.py
  251. +0 −57 pylons/bookie/model/meta.py
  252. +0 −65 pylons/bookie/model/tags.py
  253. +0 −28 pylons/bookie/model/tied_tables.py
  254. +0 −18 pylons/bookie/model/users.py
  255. BIN  pylons/bookie/public/bg.png
  256. +0 −216 pylons/bookie/public/css/bp_css.css
  257. +0 −84 pylons/bookie/public/css/bp_ie.css
  258. +0 −575 pylons/bookie/public/css/quipp.css
  259. +0 −3  pylons/bookie/public/css/tango/Makefile.am
  260. +0 −477 pylons/bookie/public/css/tango/Makefile.in
  261. +0 −82 pylons/bookie/public/css/tango/actions/Makefile.am
  262. +0 −429 pylons/bookie/public/css/tango/actions/Makefile.in
  263. BIN  pylons/bookie/public/css/tango/actions/address-book-new.png
  264. BIN  pylons/bookie/public/css/tango/actions/appointment-new.png
  265. BIN  pylons/bookie/public/css/tango/actions/bookmark-new.png
  266. BIN  pylons/bookie/public/css/tango/actions/contact-new.png
  267. BIN  pylons/bookie/public/css/tango/actions/document-new.png
  268. BIN  pylons/bookie/public/css/tango/actions/document-open.png
  269. BIN  pylons/bookie/public/css/tango/actions/document-print-preview.png
  270. BIN  pylons/bookie/public/css/tango/actions/document-print.png
  271. BIN  pylons/bookie/public/css/tango/actions/document-properties.png
  272. BIN  pylons/bookie/public/css/tango/actions/document-save-as.png
  273. BIN  pylons/bookie/public/css/tango/actions/document-save.png
  274. BIN  pylons/bookie/public/css/tango/actions/edit-clear.png
  275. BIN  pylons/bookie/public/css/tango/actions/edit-copy.png
  276. BIN  pylons/bookie/public/css/tango/actions/edit-cut.png
  277. BIN  pylons/bookie/public/css/tango/actions/edit-delete.png
  278. BIN  pylons/bookie/public/css/tango/actions/edit-find-replace.png
  279. BIN  pylons/bookie/public/css/tango/actions/edit-find.png
  280. BIN  pylons/bookie/public/css/tango/actions/edit-paste.png
  281. BIN  pylons/bookie/public/css/tango/actions/edit-redo.png
  282. BIN  pylons/bookie/public/css/tango/actions/edit-select-all.png
  283. BIN  pylons/bookie/public/css/tango/actions/edit-undo.png
  284. BIN  pylons/bookie/public/css/tango/actions/folder-new.png
  285. BIN  pylons/bookie/public/css/tango/actions/format-indent-less.png
  286. BIN  pylons/bookie/public/css/tango/actions/format-indent-more.png
  287. BIN  pylons/bookie/public/css/tango/actions/format-justify-center.png
  288. BIN  pylons/bookie/public/css/tango/actions/format-justify-fill.png
  289. BIN  pylons/bookie/public/css/tango/actions/format-justify-left.png
  290. BIN  pylons/bookie/public/css/tango/actions/format-justify-right.png
  291. BIN  pylons/bookie/public/css/tango/actions/format-text-bold.png
  292. BIN  pylons/bookie/public/css/tango/actions/format-text-italic.png
  293. BIN  pylons/bookie/public/css/tango/actions/format-text-strikethrough.png
  294. BIN  pylons/bookie/public/css/tango/actions/format-text-underline.png
  295. BIN  pylons/bookie/public/css/tango/actions/go-bottom.png
  296. BIN  pylons/bookie/public/css/tango/actions/go-down.png
  297. BIN  pylons/bookie/public/css/tango/actions/go-first.png
  298. BIN  pylons/bookie/public/css/tango/actions/go-home.png
  299. BIN  pylons/bookie/public/css/tango/actions/go-jump.png
  300. BIN  pylons/bookie/public/css/tango/actions/go-last.png
Sorry, we could not display the entire diff because too many files (568) changed.
View
4 Bookie/README.txt
@@ -1,4 +0,0 @@
-Bookie README
-
-
-
View
367 Bookie/bookie/models/__init__.py
@@ -1,367 +0,0 @@
-"""Sqlalchemy Models for objects stored with Bookie"""
-import logging
-
-from datetime import datetime
-
-from sqlalchemy import Column
-from sqlalchemy import DateTime
-from sqlalchemy import Integer
-from sqlalchemy import Unicode
-from sqlalchemy import UnicodeText
-from sqlalchemy import ForeignKey
-from sqlalchemy import Table
-
-from sqlalchemy.exc import IntegrityError
-from sqlalchemy.ext.declarative import declarative_base
-
-from sqlalchemy.orm import contains_eager
-from sqlalchemy.orm import relation
-from sqlalchemy.orm import scoped_session
-from sqlalchemy.orm import sessionmaker
-from sqlalchemy.orm import Query
-from sqlalchemy.orm.exc import NoResultFound
-
-from sqlalchemy.orm.interfaces import MapperExtension
-from sqlalchemy.orm.collections import attribute_mapped_collection
-
-from zope.sqlalchemy import ZopeTransactionExtension
-
-DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))
-Base = declarative_base()
-
-LOG = logging.getLogger(__name__)
-
-
-def initialize_sql(engine):
- """Called by the app on startup to setup bindings to the DB"""
- DBSession.configure(bind=engine)
- Base.metadata.bind = engine
-
- # only if we are on sqlite do we have this relation
- if 'sqlite' in str(DBSession.bind):
-
- if not hasattr(SqliteModel, 'bmark'):
- Bmark.fulltext = relation(SqliteModel,
- backref='bmark',
- uselist=False,
- cascade="all, delete, delete-orphan",
- )
-
-
-def todict(self):
- """Method to turn an SA instance into a dict so we can output to json"""
-
- def convert_datetime(value):
- """We need to treat datetime's special to get them to json"""
- if value:
- return value.strftime("%Y-%m-%d %H:%M:%S")
- else:
- return ""
-
- for col in self.__table__.columns:
- if isinstance(col.type, DateTime):
- value = convert_datetime(getattr(self, col.name))
- else:
- value = getattr(self, col.name)
-
- yield(col.name, value)
-
-
-def iterfunc(self):
- """Returns an iterable that supports .next()
- so we can do dict(sa_instance)
-
- """
- return self.__todict__()
-
-
-def fromdict(self, values):
- """Merge in items in the values dict into our object
-
- if it's one of our columns
-
- """
- for col in self.__table__.columns:
- if col.name in values:
- setattr(self, col.name, values[col.name])
-
-
-# Setup the SQLAlchemy database engine
-Base.query = DBSession.query_property(Query)
-Base.__todict__ = todict
-Base.__iter__ = iterfunc
-Base.fromdict = fromdict
-
-bmarks_tags = Table('bmark_tags', Base.metadata,
- Column('bmark_id', Integer, ForeignKey('bmarks.bid'), primary_key=True),
- Column('tag_id', Integer, ForeignKey('tags.tid'), primary_key=True)
-)
-
-
-class TagMgr(object):
- """Handle all non-instance related tags functions"""
-
- @staticmethod
- def from_string(tag_str):
- """Split a list of tags in string form to instances
-
- Currently it only supports space delimited
-
- """
- if tag_str == '':
- return {}
-
- tag_list = set([tag.lower().strip() for tag in tag_str.split(" ")])
- tag_objects = {}
-
- for tag in TagMgr.find(tags=tag_list):
- tag_objects[tag.name.lower()] = tag
- tag_list.remove(tag.name.lower())
-
- # any tags left in the list are new
- for new_tag in (tag for tag in tag_list if tag != ""):
- tag_objects[new_tag] = Tag(new_tag)
-
- return tag_objects
-
- @staticmethod
- def find(order_by=None, tags=None):
- """Find all of the tags in the system"""
- qry = Tag.query
-
- if tags:
- # limit to only the tag names in this list
- qry = qry.filter(Tag.name.in_(tags))
-
- if order_by is not None:
- qry = qry.order_by(order_by)
- else:
- qry = qry.order_by(Tag.name)
-
- return qry.all()
-
-
-class Tag(Base):
- """Bookmarks can have many many tags"""
- __tablename__ = "tags"
-
- tid = Column(Integer, autoincrement=True, primary_key=True)
- name = Column(Unicode(255), unique=True)
-
- def __init__(self, tag_name):
- self.name = tag_name
-
-
-class SqliteModel(Base):
- """An SA model for the fulltext table used in sqlite"""
- __tablename__ = "fulltext"
-
- bid = Column(Integer,
- ForeignKey('bmarks.bid'),
- primary_key=True,)
- description = Column(UnicodeText())
- extended = Column(UnicodeText())
- tag_string = Column(UnicodeText())
-
- def __init__(self, bid, description, extended, tag_string):
- """Expecting the properties to come from a Bmark instance
-
- tag_string is expected to be a concat list of strings from
- Bmark.tag_string()
-
- """
- self.bid = bid
- self.description = description
- self.extended = extended
- self.tag_string = tag_string
-
-
-class FullTextExtension(MapperExtension):
- """This is a mapper to handle inserting into fulltext index
-
- Since the sqlite fulltext is a separate table, we need to insert/update
- into that fulltext index whenever we add/change a bookmark
-
- Other dbs need to have the concat tag_str populated to search against
-
- """
- def before_insert(self, mapper, connection, instance):
- # we need to update the fulltext instance for this bmark instance
- # we only do this for sqlite connections, else just pass
- if 'sqlite' in str(DBSession.bind):
- LOG.error('called before insert')
- LOG.error(instance.__repr__())
- instance.fulltext = SqliteModel(instance.bid,
- instance.description,
- instance.extended,
- instance.tag_string())
- else:
- instance.tag_str = instance.tag_string()
-
-
-class BmarkMgr(object):
- """Class to handle non-instance Bmark functions"""
-
- @staticmethod
- def get_by_url(url):
- """Get a bmark from the system via the url"""
- # normalize the url
- clean_url = BmarkTools.normalize_url(url)
- return Bmark.query.filter(Bmark.url == clean_url).one()
-
- @staticmethod
- def find(order_by=None, limit=50, page=0, with_tags=False):
- """Search for specific sets of bookmarks"""
- qry = Bmark.query
-
- if order_by is not None:
- qry = qry.order_by(order_by)
- else:
- qry = qry.order_by(Bmark.bid.desc())
-
- offset = limit * page
- qry = qry.limit(limit).offset(offset).from_self()
-
- if with_tags:
- qry = qry.join(Bmark.tags).\
- options(contains_eager(Bmark.tags))
-
- return qry.all()
-
- @staticmethod
- def by_tag(tag, limit=50, page=0):
- """Get a recent set of bookmarks"""
- qry = Bmark.query.join(Bmark.tags).\
- options(contains_eager(Bmark.tags)).\
- filter(Tag.name == tag)
-
- offset = limit * page
- qry = qry.order_by(Bmark.stored.desc()).\
- limit(limit).\
- offset(offset).\
- from_self()
-
- qry = qry.outerjoin(Bmark.tags).\
- options(contains_eager(Bmark.tags))
-
- return qry.all()
-
- @staticmethod
- def recent(limit=50, page=0, with_tags=False):
- """Get a recent set of bookmarks"""
- qry = Bmark.query
-
- offset = limit * page
- qry = qry.order_by(Bmark.stored.desc()).\
- limit(limit).\
- offset(offset).\
- from_self()
-
- if with_tags:
- qry = qry.outerjoin(Bmark.tags).\
- options(contains_eager(Bmark.tags))
-
- return qry.all()
-
- @staticmethod
- def store(url, desc, ext, tags, dt=None, fulltext=None):
- """Store a bookmark
-
- :param url: bookmarked url
- :param desc: the one line description
- :param ext: the extended description/notes
- :param dt: The original stored time of this bmark
- :param fulltext: an instance of a fulltext handler
-
- """
- mark = Bmark(url,
- desc=desc,
- ext=ext,
- tags=tags,
- )
-
- DBSession.add(mark)
-
- # if we have a dt then manually set the stored value
- if dt is not None:
- mark.stored = dt
-
- # now index it into the fulltext db as well
- if fulltext:
- # need to flush to populate a bid
- DBSession.flush()
-
-
-class BmarkTools(object):
- """Some stupid tools to help work with bookmarks"""
-
- @staticmethod
- def normalize_url(url):
- """We need to clean the url so that we can easily find/check for dupes
-
- Things to do:
- - strip any trailing spaces
- - Leave any query params, but think about removing common ones like
- google analytics stuff utm_*
-
- """
- url = url.strip().strip('/')
- return url
-
-
-class Bmark(Base):
- """Basic bookmark table object"""
- __tablename__ = "bmarks"
- __mapper_args__ = {
- 'extension': FullTextExtension()
- }
-
- bid = Column(Integer, autoincrement=True, primary_key=True)
- url = Column(UnicodeText(), unique=True)
- description = Column(UnicodeText())
- extended = Column(UnicodeText())
- stored = Column(DateTime, default=datetime.now)
- updated = Column(DateTime, onupdate=datetime.now)
-
- # DON"T USE
- tag_str = Column(UnicodeText())
-
- tags = relation(Tag,
- backref="bmark",
- collection_class=attribute_mapped_collection('name'),
- secondary=bmarks_tags,
- lazy='joined',
- innerjoin=False,
- )
-
-
- def __init__(self, url, desc=None, ext=None, tags=None):
- """Create a new bmark instance
-
- :param url: string of the url to be added as a bookmark
-
- :param desc: Description field, optional
- :param ext: Extended desc field, optional
- :param tags: Space sep list of Bookmark tags, optional
-
- """
- self.url = BmarkTools.normalize_url(url)
- self.description = desc
- self.extended = ext
-
- # tags are space separated
- self.tags = TagMgr.from_string(tags)
-
- def __str__(self):
- return "<Bmark: {0}:{1}>".format(self.bid, self.url)
-
- def tag_string(self):
- """Generate a single spaced string of our tags"""
- return " ".join([tag for tag in self.tags.iterkeys()])
-
- def update_tags(self, tag_string):
- """Given a tag string, split and update our tags to be these"""
- self.tags = TagMgr.from_string(tag_string)
-
-
-
View
112 Bookie/bookie/models/fulltext.py
@@ -1,112 +0,0 @@
-"""Handle performaing fulltext searches against the database.
-
-This is going to be dependant on the db model found so we'll setup a factory
-and API as we did in the importer
-
-"""
-from sqlalchemy import text
-from sqlalchemy.orm import contains_eager
-
-from bookie.models import SqliteModel
-from bookie.models import Bmark
-from bookie.models import DBSession
-
-
-def get_fulltext_handler(engine):
- """Based on the engine, figure out the type of fulltext interface"""
- if 'sqlite' in engine:
- return SqliteFulltext()
-
- if 'mysql' in engine:
- return MySqlFulltext()
-
- if 'pg' in engine or 'postgres' in engine:
- return PgSqlFulltext()
-
-
-class SqliteFulltext(object):
- """Extend the fulltext api object to implement searches for sqlite db
-
- The sqlite db uses the table fulltext to perform searches. We need to
- perform manuall db calls to that table for searches
-
- Columns: bid, description, extended, tags
-
- Storing is done automatically via the before_insert mapper hook on Bmark
- obj
- """
- def search(self, phrase):
- """Perform the search on the index"""
- #we need to adjust the phrase to be a set of OR per word
- phrase = " OR ".join(phrase.split())
-
- desc = SqliteModel.query.\
- filter(SqliteModel.description.match(phrase))
-
- tag_str = SqliteModel.query.\
- filter(SqliteModel.tag_string.match(phrase))
-
- ext = SqliteModel.query.\
- filter(SqliteModel.extended.match(phrase))
-
- res = desc.union(tag_str, ext).join(SqliteModel.bmark).\
- options(contains_eager(SqliteModel.bmark)).\
- order_by('bmarks.stored').all()
-
- # everyone else sends a list of bmarks, so need to get our bmarks out
- # of the result set
- return [mark.bmark for mark in res]
-
-
-class MySqlFulltext(object):
- """Extend the fulltext api object to implement searches for mysql db
-
- Columns: bid, description, extended, tags
-
- """
- def search(self, phrase):
- """Perform the search on the index"""
- #we need to adjust the phrase to be a set of OR per word
- phrase = " OR ".join(phrase.split())
-
- desc = Bmark.query.\
- filter(Bmark.description.match(phrase))
-
- tag_str = Bmark.query.\
- filter(Bmark.tag_str.match(phrase))
-
- ext = Bmark.query.\
- filter(Bmark.extended.match(phrase))
-
- return desc.union(tag_str, ext).\
- order_by(Bmark.stored).all()
-
-
-class PgSqlFulltext(object):
- """Implements a basic fulltext search of pgsql
-
- slow right now, to make faster need to setup a to_vector column for storing
- http://www.postgresql.org/docs/9.0/static/textsearch-tables.html
-
- """
-
- def search(self, phrase):
- """Need to perform searches against the three columns"""
- phrase = " | ".join(phrase.split())
-
- query = """SELECT bid
- FROM bmarks
- WHERE to_tsvector('english', description) @@ to_tsquery(:phrase) OR
- to_tsvector('english', extended) @@ to_tsquery(:phrase) OR
- to_tsvector('english', tag_str) @@ to_tsquery(:phrase)
-
- ORDER BY stored DESC;
- """
-
- res = DBSession.execute(text(query), {'phrase': phrase})
-
- ids = set([r.bid for r in res])
-
- return Bmark.query.join(Bmark.tags).\
- options(contains_eager(Bmark.tags)).\
- filter(Bmark.bid.in_(ids)).all()
View
80 Bookie/bookie/routes.py
@@ -1,80 +0,0 @@
-"""Create routes here and gets returned into __init__ main()"""
-from pyramid.exceptions import NotFound
-from pyramid.exceptions import Forbidden
-from pyramid.httpexceptions import HTTPNotFound
-from pyramid.httpexceptions import HTTPForbidden
-from bookie.views.exceptions import resource_not_found
-from bookie.views.exceptions import resource_forbidden
-
-
-def build_routes(config):
- """Add any routes to the config"""
-
- config.add_view(resource_not_found,
- context=NotFound,
- renderer="exceptions/404.mako")
-
- config.add_view(resource_not_found,
- context=HTTPNotFound,
- renderer="exceptions/404.mako")
-
- config.add_view(resource_forbidden,
- context=Forbidden,
- renderer="exceptions/403.mako")
-
- config.add_view(resource_forbidden,
- context=HTTPForbidden,
- renderer="exceptions/403.mako")
-
- config.add_route("home", "", view="bookie.views.my_view",
- view_renderer="/testmako.mako")
-
- # DELAPI Routes
- config.add_route("del_post_add", "/delapi/posts/add",
- view="bookie.views.delapi.posts_add",
- view_renderer="string",)
- config.add_route("del_post_delete", "/delapi/posts/delete",
- view="bookie.views.delapi.posts_delete",
- view_renderer="string",)
- config.add_route("del_post_get", "/delapi/posts/get",
- view="bookie.views.delapi.posts_get",
- view_renderer="/delapi/posts_get.mako",)
-
- # bmark routes
- config.add_route("bmark_recent", "/recent",
- view="bookie.views.bmarks.recent",
- view_renderer="/bmark/recent.mako",)
- config.add_route("bmark_recent_page", "/recent/{page}",
- view="bookie.views.bmarks.recent",
- view_renderer="/bmark/recent.mako",)
- config.add_route("bmark_delete", "/bmark/delete",
- view="bookie.views.bmarks.delete",)
- config.add_route("bmark_confirm_delete", "/bmark/confirm/delete/{bid}",
- view="bookie.views.bmarks.confirm_delete",
- view_renderer="/bmark/confirm_delete.mako",)
-
-
- # tag related routes
- config.add_route("tag_list", "/tags",
- view="bookie.views.tags.tag_list",
- view_renderer="/tag/list.mako",)
- config.add_route("tag_bmarks", "/tags/{tag}",
- view="bookie.views.tags.bmark_list",
- view_renderer="/tag/bmarks.mako",)
- config.add_route("tag_bmarks_page", "/tags/{tag}/{page}",
- view="bookie.views.tags.bmark_list",
- view_renderer="/tag/bmarks.mako",)
-
- config.add_route("import", "/import",
- view="bookie.views.utils.import_bmarks",
- view_renderer="/utils/import.mako",)
-
- config.add_route("search", "/search",
- view="bookie.views.utils.search",
- view_renderer="/utils/results.mako",)
-
- config.add_route("export", "/export",
- view="bookie.views.utils.export",
- view_renderer="/utils/export.mako",)
-
- return config
View
198 Bookie/bookie/static/css/bookie.css
@@ -1,198 +0,0 @@
-/* BASIC PROPERTIES */
-#body {
- margin: 1em;
-}
-
-/* NAVIGATION */
-.navigation {
- text-align: right;
-}
-
-.navigation a {
- text-decoration: none;
-}
-
-.navigation form {
- display: inline-block;
-}
-
-.logo {
- font-size: 2em;
- text-decoration: none;
-}
-
-/* BUTTON UI stolen from http://ubuwaits.github.com/css3-buttons/ */
-.button_minimal {
- background: #e3e3e3;
- border: 1px solid #bbb;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- -moz-box-shadow: inset 0 0 1px 1px #f6f6f6;
- -webkit-box-shadow: inset 0 0 1px 1px #f6f6f6;
- box-shadow: inset 0 0 1px 1px #f6f6f6;
- color: #333;
- font-family: "helvetica neue", helvetica, arial, sans-serif;
- font-size: 12px;
- font-weight: bold;
- line-height: 1;
- padding: 8px 10px 9px;
- text-align: center;
- text-shadow: 0 1px 0 #fff;
- width: 150px;
- vertical-align: bottom;
-}
-
-.button_minimal:hover {
- background: #d9d9d9;
- -moz-box-shadow: inset 0 0 1px 1px #eaeaea;
- -webkit-box-shadow: inset 0 0 1px 1px #eaeaea;
- box-shadow: inset 0 0 1px 1px #eaeaea;
- color: #222;
- cursor: pointer;
-}
-
-.button_minimal:active {
- background: #d0d0d0;
- -moz-box-shadow: inset 0 0 1px 1px #e3e3e3;
- -webkit-box-shadow: inset 0 0 1px 1px #e3e3e3;
- box-shadow: inset 0 0 1px 1px #e3e3e3;
- color: #000;
-}
-
-
-/* FORM PROPERTIES */
-
-
-/* DATA LISTS */
-.data_list {
- width: 80%;
-}
-
-.data_list .bmark {
- padding: .2em;
-}
-
-.center {
- text-align: center;
-}
-
-.calendar {
- -moz-border-radius: 5px;
- border-radius: 5px;
- margin: 0px .4em;
- width: 4em;
-}
-
-.calendar h2 {
- background-color:#F00;
- background-image:-webkit-gradient( radial, 50% 50%, 0, 50% 50%, 40, from(#f44), to(#f00));
- background-image:-moz-radial-gradient(circle, #f44, #f00);
- background-image:radial-gradient(circle, #f44, #f00);
- color: #FFF;
- font-size: .9em;
- font-weight: bold;
- text-align: left;
- padding: .1em .2em;
- border: 1px solid #333;
- border-bottom-color:#999;
- margin: 0px;
- -webkit-border-top-right-radius: 2px;
- -webkit-border-top-left-radius: 2px;
- -moz-border-radius-topright: 2px;
- -moz-border-radius-topleft: 2px;
- border-top-right-radius: 2px;
- border-top-left-radius: 2px;
-}
-
-.calendar div {
- background-color: #CCCCCC;
- color: #000000;
- font-size: 1.3em;
- text-align: center;
- padding: .1em .2em;
- border: 1px solid #333;
- border-top:none;
- -webkit-border-bottom-right-radius: 2px;
- -webkit-border-bottom-left-radius: 2px;
- -moz-border-radius-bottomright: 2px;
- -moz-border-radius-bottomleft: 2px;
- border-bottom-right-radius: 2px;
- border-bottom-left-radius: 2px;
-}
-
-
-.tags {
- padding: .3em;
- padding-left: 2em;
- font-size: .8em;
- text-align: right;
-}
-
-a.tag {
- padding: .2em .4em;
- border: 1px solid #666666;
- -moz-border-radius: 5px;
- border-radius: 5px;
- background: #CCCCCC;
- color: #333333;
- text-decoration: none;
-}
-
-a.bmark {
- font-size: 1.1em;
- text-decoration: none;
-}
-
-.bmark .time {
- text-align: right;
- font-size: .7em;
- font-color: #333;
-}
-
-.body form {
- padding: .5em 1em;
-
-}
-
-.note {
- border: 1px solid #666;
- background: #CCC;
- padding: .5em;
-}
-
-fieldset legend {
- font-size: .9em;
- font-weight: bold;
- border-bottom: 1px solid #999;
- margin-bottom: 2em;
-}
-
-form ul {
- margin-left: 0px;
-}
-
-form li {
- list-style: none;
- margin-left: 0px;
- padding: .2em 0em;
-}
-
-form li label {
- font-weight: bold;
-}
-
-.right {
- text-align: right;
-}
-
-.footer {
- color: #666666;
- margin-top: 5em;
- font-size: .8em;
-}
-
-.footer a {
- color: #666666;
- text-decoration: none;
-}
View
BIN  Bookie/bookie/static/favicon.ico
Binary file not shown
View
BIN  Bookie/bookie/static/footerbg.png
Deleted file not rendered
View
BIN  Bookie/bookie/static/headerbg.png
Deleted file not rendered
View
8 Bookie/bookie/static/ie6.css
@@ -1,8 +0,0 @@
-* html img,
-* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
-this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
-this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
-this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
-this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
-);}
-#wrap{display:table;height:100%}
View
BIN  Bookie/bookie/static/middlebg.png
Deleted file not rendered
View
65 Bookie/bookie/static/pylons.css
@@ -1,65 +0,0 @@
-html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;/* 16px */
-vertical-align:baseline;background:transparent;}
-body{line-height:1;}
-ol,ul{list-style:none;}
-blockquote,q{quotes:none;}
-blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}
-:focus{outline:0;}
-ins{text-decoration:none;}
-del{text-decoration:line-through;}
-table{border-collapse:collapse;border-spacing:0;}
-sub{vertical-align:sub;font-size:smaller;line-height:normal;}
-sup{vertical-align:super;font-size:smaller;line-height:normal;}
-ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;}
-ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;}
-li{display:list-item;}
-ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;}
-ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;}
-ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;}
-.hidden{display:none;}
-p{line-height:1.5em;}
-h1{font-size:1.75em;line-height:1.7em;font-family:helvetica,verdana;}
-h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;}
-h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;}
-h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;}
-html,body{width:100%;height:100%;}
-body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;}
-a{color:#1b61d6;text-decoration:none;}
-a:hover{color:#e88f00;text-decoration:underline;}
-body h1,
-body h2,
-body h3,
-body h4,
-body h5,
-body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;}
-#wrap{min-height:100%;}
-#header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;}
-#header{background:#000000;top:0;font-size:14px;}
-#footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;}
-.header,.footer{width:750px;margin-right:auto;margin-left:auto;}
-.wrapper{width:100%}
-#top,#top-small,#bottom{width:100%;}
-#top{color:#000000;height:230px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
-#top-small{color:#000000;height:60px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;}
-#bottom{color:#222;background-color:#ffffff;}
-.top,.top-small,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
-.top{padding-top:40px;}
-.top-small{padding-top:10px;}
-#middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;}
-.app-welcome{margin-top:25px;}
-.app-name{color:#000000;font-weight:bold;}
-.bottom{padding-top:50px;}
-#left{width:350px;float:left;padding-right:25px;}
-#right{width:350px;float:right;padding-left:25px;}
-.align-left{text-align:left;}
-.align-right{text-align:right;}
-.align-center{text-align:center;}
-ul.links{margin:0;padding:0;}
-ul.links li{list-style-type:none;font-size:14px;}
-form{border-style:none;}
-fieldset{border-style:none;}
-input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;}
-input[type=text],input[type=password]{width:205px;}
-input[type=submit]{background-color:#ddd;font-weight:bold;}
-/*Opera Fix*/
-body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;}
View
BIN  Bookie/bookie/static/pyramid-small.png
Deleted file not rendered
View
BIN  Bookie/bookie/static/pyramid.png
Deleted file not rendered
View
BIN  Bookie/bookie/static/transparent.gif
Deleted file not rendered
View
96 Bookie/bookie/templates/bmark/func.mako
@@ -1,96 +0,0 @@
-<%def name="display_bmark_list(bmark_list)">
- <%
- from datetime import datetime
- current_date = datetime(1900, 1, 1).strftime("%m/%d")
- last_date = current_date
- %>
- <div class="yui3-g">
- % for bmark in bmark_list:
- ${bmark_block(bmark, last_date)}
- <%
- last_date = bmark.stored.strftime("%m/%d")
- %>
-
- % endfor
- </div>
-</%def>
-
-<%def name="bmark_block(bmark, last_date)">
- <%
- is_new = (last_date != bmark.stored.strftime("%m/%d"))
- %>
- <div class="yui3-u-1"
- % if is_new:
- style="border-top: 1px solid #999999;"
- % endif
- >
- <div class="yui3-g bmark">
- <div class="yui3-u-1-8">
- <div class="center">
- % if is_new:
- ${date_divider(bmark.stored)}
- % endif
- </div>
- </div>
-
- <div class="yui3-u-7-8">
- <div class="yui3-g">
- <div class="yui3-u-7-8">
- <a class="bmark" href="${bmark.url}" title="${bmark.extended}">${bmark.description}</a>
- </div>
-
- <div class="yui3-u-1-8">
- % if allow_edit:
- <span><a href="#">edit</a></span>
- <span><a href="${request.route_url('bmark_confirm_delete', bid=bmark.bid)}">delete</a></span>
- % endif
- </div>
-
- <div class="yui3-u-7-8">
- <div class="tags">
- % for tag in bmark.tags:
- <a class="tag" href="${request.route_url('tag_bmarks', tag=tag, page=prev)}">${tag}</a>
- %endfor
- </div>
- </div>
-
- <div class="yui3-u-1-8">
- <div class="bmark time">${bmark.stored.strftime('%H:%M%P')}</div>
- </div>
- </div>
- </div>
- </div>
-
- </div>
-</%def>
-
-<%def name="date_divider(dateobj)">
- <div class="calendar">
- <h2>${dateobj.strftime("%b")}</h2>
- <div>${dateobj.strftime("%d")}</div>
- </div>
-</%def>
-
-<%def name="bmarknextprev(page, max_count, count, next_url, url_params=None)">
- <%
- if max_count == count:
- show_next = True
- else:
- show_next = False
-
- next = page + 1
-
- if url_params is None:
- url_params = {}
- %>
-
- % if page != 0:
- <% prev = page - 1 %>
- <a href="${request.route_url(next_url, page=prev, **url_params)}">Prev</a>
- % endif
-
- % if show_next:
- <a href="${request.route_url(next_url, page=next, **url_params)}">Next</a>
- % endif
-
-</%def>
View
22 Bookie/bookie/templates/bmark/recent.mako
@@ -1,22 +0,0 @@
-<%inherit file="/main_wrap.mako" />
-<%namespace file="func.mako" import="display_bmark_list, bmarknextprev"/>
-<%def name="title()">Recent Bookmarks</%def>
-
-<h1>Showing ${max_count} bookmarks</h1>
-
-<div class="yui3-g data_list">
- <div class="yui3-u-7-8">&nbsp;</div>
- <div class="yui3-u-1-8">
- ${bmarknextprev(page, max_count, count, 'bmark_recent_page')}
- </div>
-
- <div class="yui3-u-1">
- ${display_bmark_list(bmarks)}
- </div>
-
- <div class="yui3-u-7-8">&nbsp;</div>
-
- <div class="yui3-u-1-8">
- ${bmarknextprev(page, max_count, count, 'bmark_recent_page')}
- </div>
-</div>
View
49 Bookie/bookie/templates/main_wrap.mako
@@ -1,49 +0,0 @@
-<html>
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=8" />
- <title>Bookie: ${self.title()}</title>
- <link rel="stylesheet" type="text/css"
- href="http://yui.yahooapis.com/combo?3.3.0/build/cssreset/reset-min.css&3.3.0/build/cssfonts/fonts-min.css&3.3.0/build/cssgrids/grids-min.css&3.3.0/build/cssbase/base-min.css">
-
- <link rel="stylesheet" type="text/css" href="/static/css/bookie.css">
-
- % if hasattr(self, 'header'):
- ${self.header()}
- % endif
- </head>
-
- <body>
- <div id="navigation" class="yui3-g">
- <div class="yui3-u-2-3"><a href="/recent" class="logo">Logo/Title</a></div>
- <div class="yui3-u-1-3 navigation">
- <span class="item"><a href="/recent" class="button_minimal">Recent</a></span>
- <span class="item"><a href="/tags" class="button_minimal">Tags</a></span>
- <span class="item">
- <span class="button_minimal">
- <form action="${request.route_url('search')}" method="get"/>
- <input type="search" name="search" id="search" placeholder="search.." />
- </form>
- </span>
- </span>
- </div>
- </div>
- <div id="body">
- ${next.body()}
- </div>
-
- <div class="footer">
- <div class="yui3-g">
- <div class="yui3-u-1-4"></div>
- <div class="yui3-u-3-4">
- <div class="right">
- <a href="http://bmark.us">Bookie</a> |
- <a href="http://https://github.com/mitechie/Bookie/issues">Support</a> |
- <a href="#changelog">Changes</a> |
- <a href="${request.route_url('import')}">Import</a> |
- <a href="${request.route_url('export')}">Export</a>
- </div>
- </div>
- </div>
- </div>
- </body>
-</html>
View
25 Bookie/bookie/templates/tag/bmarks.mako
@@ -1,25 +0,0 @@
-<%inherit file="/main_wrap.mako" />
-<%namespace file="../bmark/func.mako" import="display_bmark_list, bmarknextprev"/>
-<%def name="title()">Bookmarks for: ${tag}</%def>
-
-<%
- url_params = {'tag': tag}
-%>
-
-<h1>Bookmarks: ${tag}</h1>
-
-<div class="yui3-g data_list">
- <div class="yui3-u-7-8">&nbsp;</div>
- <div class="yui3-u-1-8">
- ${bmarknextprev(page, max_count, count, 'tag_bmarks_page',
- url_params=url_params)}
- </div>
-
- ${display_bmark_list(bmark_list)}
-
- <div class="yui3-u-7-8">&nbsp;</div>
- <div class="yui3-u-1-8">
- ${bmarknextprev(page, max_count, count, 'tag_bmarks_page',
- url_params=url_params)}
- </div>
-</div>
View
45 Bookie/bookie/tests/__init__.py
@@ -1,45 +0,0 @@
-import ConfigParser
-import os
-import unittest
-from pyramid.config import Configurator
-from pyramid import testing
-
-global_config = {}
-
-ini = ConfigParser.ConfigParser()
-ini.read('test.ini')
-settings = dict(ini.items('app:bookie'))
-
-
-def setup_db(settings):
- """ We need to create the test sqlite database to run our tests against
-
- If the db exists, remove it
- We're using the SA-Migrations API to create the db and catch it up to the
- latest migration level for testing
-
- In theory, we could use this API to do version specific testing as well if
- we needed to.
-
- If we want to run any tests with a fresh db we can call this function
-
- """
- from migrate.versioning import api as mig
- sa_url = settings['sqlalchemy.url']
- migrate_repository = 'migrations'
-
- # we're hackish here since we're going to assume the test db is whatever is
- # after the last slash of the SA url sqlite:///somedb.db
- db_name = sa_url[sa_url.rindex('/') + 1:]
- try:
- os.remove(db_name)
- except:
- pass
-
- open(db_name, 'w').close()
-
- mig.version_control(sa_url, migrate_repository)
- mig.upgrade(sa_url, migrate_repository)
-
-
-setup_db(settings)
View
0  Bookie/bookie/tests/test_utils/__init__.py
No changes.
View
90 Bookie/bookie/tests/test_utils/test_fulltext.py
@@ -1,90 +0,0 @@
-"""Test the fulltext implementation"""
-import transaction
-import urllib
-
-from nose.tools import ok_
-from pyramid import testing
-from unittest import TestCase
-
-from bookie.models import DBSession
-from bookie.models import Bmark
-from bookie.models import Tag
-from bookie.models import bmarks_tags
-from bookie.models.fulltext import get_fulltext_handler
-from bookie.models.fulltext import SqliteFulltext
-
-class TestFulltext(TestCase):
- """Test that our fulltext classes function"""
-
- def setUp(self):
- """Setup Tests"""
- from pyramid.paster import get_app
- app = get_app('test.ini', 'main')
- from webtest import TestApp
- self.testapp = TestApp(app)
- testing.setUp()
-
- def tearDown(self):
- """Tear down each test"""
- testing.tearDown()
- session = DBSession()
- Bmark.query.delete()
- Tag.query.delete()
- session.execute(bmarks_tags.delete())
- session.flush()
- transaction.commit()
-
- def _get_good_request(self):
- """Return the basics for a good add bookmark request"""
- session = DBSession()
- prms = {
- 'url': u'http://google.com',
- 'description': u'This is my google desc',
- 'extended': u'And some extended notes about it in full form',
- 'tags': u'python search',
- 'api_key': u'testapi',
- }
-
- req_params = urllib.urlencode(prms)
- res = self.testapp.get('/delapi/posts/add?' + req_params)
- session.flush()
- transaction.commit()
- return res
-
- def test_get_handler(self):
- """Verify we get the right type of full text store object"""
- sqlite_str = "sqlite:///somedb.db"
-
- handler = get_fulltext_handler(sqlite_str)
-
- ok_(isinstance(handler, SqliteFulltext),
- "Should get a sqlite fulltext handler")
-
- def test_sqlite_save(self):
- """Verify that if we store a bookmark we get the fulltext storage"""
- # first let's add a bookmark we can search on
- res = self._get_good_request()
-
- search_res = self.testapp.get('/search?search=google')
-
- ok_(search_res.status == '200 OK',
- "Status is 200: " + search_res.status)
-
- ok_('my google desc' in search_res.body,
- "We should find our description on the page: " + search_res.body)
-
- search_res = self.testapp.get('/search?search=python')
-
- ok_(search_res.status == '200 OK',
- "Status is 200: " + search_res.status)
-
- ok_('my google desc' in search_res.body,
- "Tag search should find our description on the page: " + search_res.body)
-
- search_res = self.testapp.get('/search?search=extended%20notes')
-
- ok_(search_res.status == '200 OK',
- "Status is 200: " + search_res.status)
-
- ok_('extended notes' in search_res.body,
- "Extended search should find our description on the page: " + search_res.body)
View
7 Bookie/bookie/views/__init__.py
@@ -1,7 +0,0 @@
-"""Basic views with no home"""
-from pyramid.httpexceptions import HTTPFound
-
-
-def my_view(request):
- """Iniital / view for now until we find a better one"""
- return HTTPFound(location=request.route_url("bmark_recent"))
View
70 Bookie/bookie/views/bmarks.py
@@ -1,70 +0,0 @@
-"""Controllers related to viewing lists of bookmarks"""
-import logging
-
-from pyramid.httpexceptions import HTTPForbidden
-from pyramid.httpexceptions import HTTPFound
-from pyramid.httpexceptions import HTTPNotFound
-
-from bookie.lib import access
-from bookie.models import DBSession
-from bookie.models import Bmark
-from bookie.models import BmarkMgr
-
-LOG = logging.getLogger(__name__)
-RESULTS_MAX = 50
-
-
-def recent(request):
- """Most recent list of bookmarks capped at MAX"""
- rdict = request.matchdict
-
- # check if we have a page count submitted
- page = int(rdict.get('page', '0'))
-
- recent_list = BmarkMgr.recent(limit=RESULTS_MAX,
- with_tags=True,
- page=page)
-
- return {
- 'bmarks': recent_list,
- 'max_count': RESULTS_MAX,
- 'count': len(recent_list),
- 'page': page,
- 'allow_edit': access.edit_enabled(request.registry.settings),
- }
-
-
-def confirm_delete(request):
- """Confirm deletion of bookmark"""
- rdict = request.matchdict
- bid = int(rdict.get('bid', 0))
- if bid:
- found = Bmark.query.get(bid)
-
- if not found:
- return HTTPNotFound()
-
- return {
- 'bid': bid,
- 'bmark_description': found.description
- }
-
-
-def delete(request):
- """Remove the bookmark in question"""
- rdict = request.POST
-
- if not access.edit_enabled(request.registry.settings):
- raise HTTPForbidden("Auth to edit is not enabled")
-
- # make sure we have an id value
- bid = int(rdict.get('bid', 0))
-
- if bid:
- found = Bmark.query.get(bid)
-
- if found:
- DBSession.delete(found)
- return HTTPFound(location=request.route_url('bmark_recent'))
-
- return HTTPNotFound()
View
49 Bookie/bookie/views/tags.py
@@ -1,49 +0,0 @@
-"""Controllers related to viewing Tag information"""
-import logging
-from pyramid.httpexceptions import HTTPNotFound
-from pyramid.settings import asbool
-
-from bookie.lib import access
-from bookie.models import BmarkMgr
-from bookie.models import TagMgr
-
-LOG = logging.getLogger(__name__)
-RESULTS_MAX = 50
-
-
-def tag_list(request):
- """Display a list of your tags"""
- tags_found = TagMgr.find()
-
- return {
- 'tag_list': tags_found,
- 'tag_count': len(tags_found),
- }
-
-
-def bmark_list(request):
- """Display the list of bookmarks for this tag"""
- rdict = request.matchdict
-
- # check if we have a page count submitted
- tag = rdict.get('tag')
- page = int(rdict.get('page', 0))
-
- # verify the tag exists before we go on
- # 404 if the tag isn't found
- exists = TagMgr.find(tags=[tag])
-
- if not exists:
- raise HTTPNotFound()
-
- bmarks = BmarkMgr.by_tag(tag,
- limit=RESULTS_MAX,
- page=page)
-
- return {'tag': tag,
- 'bmark_list': bmarks,
- 'max_count': RESULTS_MAX,
- 'count': len(bmarks),
- 'page': page,
- 'allow_edit': access.edit_enabled(request.registry.settings),
- }
View
82 Bookie/bookie/views/utils.py
@@ -1,82 +0,0 @@
-"""View callables for utilities like bookmark imports, etc"""
-import logging
-from pyramid.httpexceptions import HTTPFound
-
-from bookie.lib.importer import Importer
-from bookie.lib.access import Authorize
-from bookie.models import Bmark
-from bookie.models.fulltext import get_fulltext_handler
-
-LOG = logging.getLogger(__name__)
-
-
-def import_bmarks(request):
- """Allow users to upload a delicious bookmark export"""
- data = {}
- post = request.POST
- LOG.error(request.registry.settings.get('api_key', ''))
- LOG.error(post.get('api_key'))
- if post:
- # we have some posted values
- with Authorize(request.registry.settings.get('api_key', ''),
- post.get('api_key', None)):
-
- # if auth fails, it'll raise an HTTPForbidden exception
- files = post.get('import_file', None)
-
- if files is not None:
- # upload is there for use
- # process the file using the import script
- importer = Importer(files.file)
-
- # we want to store fulltext info so send that along to the
- # import processor
- conn_str = request.registry.settings.get('sqlalchemy.url',
- False)
- searcher = get_fulltext_handler(conn_str)
- importer.process(fulltext=searcher)
-
- # @todo get a count of the imported bookmarks and setup a flash
- # message. Forward to / and display the import message
-
- # request.session.flash("Error something")
- return HTTPFound(location=request.route_url('home'))
- else:
- msg = request.session.pop_flash()
-
- if msg:
- data['error'] = msg
- else:
- data['error'] = None
-
- return data
- else:
- # just display the form
- return {}
-
-
-def search(request):
- """Search for the content in the matchdict"""
- rdict = request.GET
-
- # check if we have a page count submitted
- phrase = rdict.get('search', '')
-
- conn_str = request.registry.settings.get('sqlalchemy.url', False)
- searcher = get_fulltext_handler(conn_str)
-
- res_list = searcher.search(phrase)
-
- return {
- 'search_results': res_list,
- 'result_count': len(res_list),
- 'phrase': phrase,
- }
-
-
-def export(request):
- """Handle exporting a user's bookmarks to file"""
- bmark_list = Bmark.query.join(Bmark.tags).all()
- return {
- 'bmark_list': bmark_list,
- }
View
130 Bookie/docs/Makefile
@@ -1,130 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-PAPER =
-BUILDDIR = _build
-
-# Internal variables.
-PAPEROPT_a4 = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
-
-help:
- @echo "Please use \`make <target>' where <target> is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " singlehtml to make a single large HTML file"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " devhelp to make HTML files and a Devhelp project"
- @echo " epub to make an epub"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
- @echo " text to make text files"
- @echo " man to make manual pages"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
-
-clean:
- -rm -rf $(BUILDDIR)/*
-
-html:
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dirhtml:
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
- @echo
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
- @echo
- @echo "Build finished; now you can process the pickle files."
-
-json:
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
- @echo
- @echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Bookie.qhcp"
- @echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Bookie.qhc"
-
-devhelp:
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
- @echo
- @echo "Build finished."
- @echo "To view the help file:"
- @echo "# mkdir -p $$HOME/.local/share/devhelp/Bookie"
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Bookie"
- @echo "# devhelp"
-
-epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
- @echo
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
- "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through pdflatex..."
- make -C $(BUILDDIR)/latex all-pdf
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
- @echo
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
- @echo
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-changes:
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
- @echo
- @echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
View
32 Bookie/docs/chrome.rst
@@ -1,32 +0,0 @@
-Google Chrome Extension
-========================
-
-Provides Bookie bookmarks into Google Chrome
-
-Features
-----------
-
-- integrated popup dialog to save current site to your Bookie install.
-- supports loading existing bookmark data if you're on a page already
- bookmarked
-
-Installation
-------------
-The `manifest.json` file has to be updated for the url you're hosting your
-Bookie instance on. In the future, we should try to provide a bundling service
-where you enter that url, and we write out the manifest and provide a
-downloadable package ready to go.
-
-For now you must manually load the directory into your extensions as an
-unpackaged extension. You have to manually make sure your Bookie url is in the
-list of permitted urls so that it can make cross domain ajax requests to store
-and retrieve data.
-
-Mitechie Fork
---------------
-I've forked this to be able to customize the delicious api url to work with my
-own bookmark app. You can basically change the url to whatever in the
-delicious.js file and add the directory into Chrome as an unpacked extension.
-Will try to work on this to add some ui for adjusting the ui from the options
-along with some tweaks to help provide some search/etc feedback of existing
-bookmarks.
View
4 Bookie/docs/firefox.rst
@@ -1,4 +0,0 @@
-Firefox Extension
------------------
-
-TBD
View
42 Bookie/docs/index.rst
@@ -1,42 +0,0 @@
-.. Bookie documentation master file, created by
- sphinx-quickstart on Fri Feb 4 23:04:10 2011.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-Welcome to Bookie's documentation!
-==================================
-Bookie is my attempt to rid myself of Delicious, and be able host my bookmarks
-which I hold dear myself.
-
-Beyond that, there's some features I think that are long overdue.
-
-Contents:
-
-.. toctree::
- :maxdepth: 2
-
- started
- database
- hosting
- fabric
- tests
- todo
- user
- chrome
- firefox
-
-.. Indices and tables
-.. ==================
-..
-.. * :ref:`genindex`
-.. * :ref:`modindex`
-.. * :ref:`search`
-
-
-Using Bookie
-============
-So far, there's no real web interface. Personally, I use a Chrome extension for
-most of my bookmark use and I'm starting there first. I've forked an open
-source Chrome bookmark you can use to work with Bookie.
-
-https://github.com/mitechie/delicious-chrome-extension
View
79 Bookie/docs/started.rst
@@ -1,79 +0,0 @@
-Getting Started
-===============
-
-Bookie's git repository is managed using a tool/process called `git flow`_. It
-basically sets standards for how the git repository is set up. You'll find the
-most up to date *working* code in the develop branch. Individual features that
-are being worked on are in branches prefixed by `feature/`. As these features
-get to a workable state they might get merged into the `develop` branch.
-
-The `master` branch is only for releases and we're a long away from that. So
-when you check out Bookie, make sure to start out using the `develop` branch.
-
-Some basic docs on getting started with the project. Before you ask, yes this
-will get much easier as the project moves forward. It's in development mode
-still.
-
-
-Ubuntu Linux
-------------
-If you're running Ubuntu, here's some actual commands to get you started.
-
-
-::
-
- $ wget http://bmark.us/bootstrap.py
- $ python bootstrap.py bookie
- $ source bookie/bin/activate
- $ cd bookie/bookie/Bookie/
-
- # $myname is a name you're giving your installation. Just one word will do
- $ fab new_install:$myname
-
- # this will create a config file for you called $myname.ini
- # feel free to edit this config for your needs and then
- $ fab $myname db_new_install
-
- # startup the development web server
- $ paster serve --reload $myname.ini
-
-You should now be able to pull up:
-
-http://127.0.0.1:6543
-
-
-To Do
-~~~~~~
-- Update the bootstrap.py to use a tarball source to avoid git requirement
-- Link to the hosting docs about setting up bookie to run for good
-
-
-Where to go from here
----------------------
-Well, you might want to import a backup of your delicious bookmarks. You can do
-that by vising the *Import* link in the footer of your site installation
-
-You can view your recent bookmarks at: http://127.0.0.1:6543/recent
-
-You can also start using the `Google Chome extension`_ to save and edit
-bookmarks you have in Bookie. It will only work based on the current page, a
-full UI for managing your bookmarks is in the works.
-
-Once you install the extension, you'll need to set the options for it to work.
-
-API Url
- set this to the installed url for your bookie instance. In dev mode
- it's `127.0.0.1:6543/delapi/`. Make sure to include the */delapi/* in the url
- for the extension to work. If you do not set the api you should get an error
- on the extension icon badge *!URL*
-
-
-API Key
- this is the same key you set in your installations *.ini* config
- file. You should set this to be your own unique string and make sure that
- your server install and extension match. If they don't, you'll be unable to
- store bookmarks to your Bookie server.
-
-
-.. _`git flow`: https://github.com/nvie/gitflow
-.. _`Google Chome extension`: http://bmark.us/bookie_chrome.crx
View
34 Bookie/docs/user.rst
@@ -1,34 +0,0 @@
-User Docs
-=========
-
-
-Importing
-----------
-Bookie currently supports the Delicious export and the Google Bookmarks export
-formats.
-
-
-- Delicious: You can export from Delicious by going to `Settings` and clicking
- the `Import / Upload Bookmarks` link under the `Bookmarks` section.
-- Google Bookmarks: TBD
-
-The importer might take a bit on large sets of bookmarks. Let us know if you
-run into any issues so we can improve our import process.
-
-Settings to think about
-------------------------
-
-allow_edit: set this to 1 if you want to enable edits via the web ui. Since
-your site isn't protected by a username and password, you don't want to do this
-on a publicly available instance of Bookie. Leave it at 0 and use an API tool
-such as the `Chrome Plugin`_ to make edits and remove bookmarks.
-
-ToDo
------
-Look into other formats to import, create the ability to choose/detect the
-import format for new importers.
-
-Make sure we force submitting your API Key once that's complete as part of the
-form submission. Help prevent people from using the importer against you.
-
-.. _Chrome Plugin: https://github.com/mitechie/delicious-chrome-extension
View
27 Bookie/extensions/chrome_ext/background.html
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <title></title>
- <script type="text/javascript">
- var ui = (function() {
- var module = {};
-
-
- module.badge = {
- 'clear': function(millis) {
- var ttl = millis || 0;
- window.setTimeout(function() {
- chrome.browserAction.setBadgeText({text: ''});
- }, ttl);
- },
- };
-
- return module;
- })();
- </script>
-</head>
-<body>
-
-</body>
-</html>
View
269 Bookie/extensions/chrome_ext/bookie-core.js
@@ -1,269 +0,0 @@
-/*jslint eqeqeq: false, browser: true, debug: true, onevar: true, plusplus: false, newcap: false, */
-/*global $: false, window: false, self: false, escape: false, mor: false, sprintf: false, chrome: false, localStorage: false, */
-
-/* chrome-extension-specific bookie functionality */
-
-var bookie = (function (module, $) {
-
- // bootstrap some custom things that the extensions will jump in on
- module.ui = {};
- module.call = {};
-
- // some constants we'll use throughout
- // dom hook for triggering/catching events fired
- module.EVENTID = '#bmarkbody';
-
- /**
- * Define events supported
- * Currently we've got LOAD, SAVED, ERROR, DELETE, UPDATE
- *
- */
- module.events = {
- 'LOAD': 'load',
- 'onload': function (ev) {
- $('#tags').focus();
- $('#form').bind('submit', function (ev) {
- var data = $(this).serialize();
- module.call.saveBookmark(data);
- ev.preventDefault();
- });
-
- module.populateForm();
- },
-
- 'SAVE': 'save',
- 'ERROR': 'error',
-
- /**
- * Make the call to remove the bookmark
</