bhanderson / pbnh Goto Github PK
View Code? Open in Web Editor NEWmix between pb and haste
License: MIT License
mix between pb and haste
License: MIT License
look at pb's implementation to see if its good enough
Checkout: 0b00bc5
Setup:
$ git clone [email protected]:wadechristie/pbnh.git
$ cd pbnh; virtualenv --python=python3 venv; source venv/bin/activate
$ pip install -r requirements.txt
Error:
$ python -m pbnh.run
Traceback (most recent call last):
File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/wchristie/opt/pbnh/pbnh/run.py", line 1, in <module>
from pbnh.app import app
File "/home/wchristie/opt/pbnh/pbnh/app/__init__.py", line 4, in <module>
from pbnh.app import views
File "/home/wchristie/opt/pbnh/pbnh/app/views.py", line 12, in <module>
from pbnh.app import util
File "/home/wchristie/opt/pbnh/pbnh/app/util.py", line 11, in <module>
config = conf.get_config().get('database')
File "/home/wchristie/opt/pbnh/pbnh/conf.py", line 6, in get_config
with open (path) as config:
FileNotFoundError: [Errno 2] No such file or directory: '/home/wchristie/.config/pbnh/config.yml'
maybe put is at /docs?
write a cli client using curl
git it?
big files shouldn't be in the db
Their API is super clean imo
bytea have a max size of 1GB instead of 2GB for LOB, but they get stored directly in the table which takes the total max storage potential from 4TB to 36TB.
I think I am already doing that, this is just a reminder for me to check at some point.
this way unit tests don't pollute the real db
default to forever but allow <24hrs
I think flask changed their configuration scheme when they went 1.0 and I never noticed because I don't use the flask webserver. We should still fix it though.
notably for setting db connection info
De-duplicate pastes for free
preferably do this git style, where there is a short id and a full id, with the short id going to the most recently accessed full_id with the corresponding short_id
It might make it harder to import old pastes, though
if I upload an image, it should be detected as an image. If I upload a json file, it should know it is json.
It should pass the mimetype on to the browser in a request to help display it better, as well.
Checkout: 1f31678
Fresh install using sqlite db driver.
Error:
Traceback (most recent call last):
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/wchristie/opt/pbnh/pbnh/app/views.py", line 72, in view_paste
query = util.getPaste(paste_id)
File "/home/wchristie/opt/pbnh/pbnh/app/util.py", line 69, in getPaste
username=config.get('username')) as pstr:
File "/home/wchristie/opt/pbnh/pbnh/db/paste.py", line 26, in __enter__
self.engine = create_engine(connection, pool_size=1)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/sqlalchemy/engine/__init__.py", line 386, in create_engine
return strategy.create(*args, **kwargs)
File "/home/wchristie/opt/pbnh/venv/lib/python3.4/site-packages/sqlalchemy/engine/strategies.py", line 144, in create
engineclass.__name__))
TypeError: Invalid argument(s) 'pool_size' sent to create_engine(), using configuration SQLiteDialect_pysqlite/NullPool/Engine. Please check that the keyword arguments are appropriate for this combination of components.
front end shouldnt be like github with large commits
It has improved significantly recently, and even though it isn't heavily used we should still probably update it to take advantage of the improvements.
if you are migrating from haste it has an id and content
Not sure whether we want to implement this or not.
pb allows naming pastes with a /~something flag.
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.