Finally put together page_html
Note it uses a trick to avoid colliding the html-element-ids but 10/62 of the time it started with a number. Hence i didn’t notice, i have fixed this in 0.0.3
Finally put together page_html, so that linux/unix users don’t have to gather the whole bunch git repos of and configure lua to load it properly. I also fixed some annoyances.
It has userscripts talking to the server. One main one is
commands.user.js
, which is a commands panel that can be brought up with
Control-“;”. The below also represents the features it brings:
- Bookmarks, using
bm
in the command interface userscript. Has a searchable listing in:http://localhost:9090/bookmarks
Entries can be deleted/altered there aswel. No entering new ones there yet.
Browsing history. Has a searching history:
http://localhost:9090/history
.The userscripts that implement the history/commands can be obtained in
http://localhost:9090/userscripts
.
They've been tested with firefox on [Greasemonkey](http://greasespot.net/).
Mirroring using
document.innerHTML
, crude, but then javascript doesn’t seem to have good options here. Runs all the time the corresponding userscript is enabled.mirror
mirrors manually in another way;
`wget --convert-links -P "%s" -e robots=off --user-agent=one_page_plz -p "%s"`
Not only more complete, but also not overwritten every time you go there.
vid
command runsmpv
(if that exists) on the hovered/current uri.
It doubles as command to mirror images and pdfs. Saves having to organize those files when you download them. Viewing them with pdf.js, you can also bookmark them.
syms
allows for easily getting a html symbol in your clipboard.qm
andgqm
do quickmarks, not nearly good enough yet, the list doesn’t traverse easily enough, and needs to be easy way to “delete-and-go” for quickmark functionality.values
is an interface for changing what’s inGM_getValue
etc. Addextra
;tor=true;
, and mirroring should use TOR, can seeos.execute
in stdout. (some ofecho
/mkdir
are filtered out)
It has keyboard(arrow) navigation everywhere. Control-arrows moves around.
Some screenshots
Note that it shows SQL, it can also run it. (Note: that may be a security concern, defaultly turned it off in lua)
But you can just throw in search terms in the input
above. Something like tags:something
should also work.
Getting it
The file is at ojasper.nl/data/data/page_html_set.lua.0.0.3.tar.gz, contains instructions. Basically run one of the shellscripts from its own directory.
Windows isn’t particularly supported, suspect it is a matter of the correct
lua-socket .DLL
being loadable, and then running lua with packages available, but i
am not sure.(careful with which .DLL
s you trust)
for those with Arch Linux, there is an
PKGBUILD.
With that, running page_html.lua
defaultly it runs on port 9090
that can be
specified, but then you have to update the userscripts manually read the right
port aswel.
Once running, http://localhost:9090/userscripts
contains the userscripts, Greasemonkey can load them by
just visiting the files. Haven’t tested other userscript implementations.
The PKGBUILD
does not follow etiquette properly. It just writes down
/usr/bin/page_html.lua
with a package.path
loading the lua from
/usr/local/share/page_html.lua/
which just contains the same as the tar.gz
.
In the future PKGBUILD
s should be done better.
(afaics, its not particularly bothersome to anyone?)
Customizing
There is some room for it;
~/.page_html/assets/$PAGE_NAME/assets/
can contain extra assets for said page.userscripts/cmds_list.js
is “the list”, of commands for the panel. Very raw way of adding things, though.~/.page_html/lua/
is looked in first; you can replace lua files, particularly:page_html.util.exec_allowed
patterns controlling limitations onos.execute
.page_html.apps.util.cmds
contains the commands avaiable from util.
However, no way to readily add any to the command-interface yet (though you could modify)
page_html.apps.util.mirror_image_detect
recognizes files for downloading-as-local mirror.run
where lua enters.
Nice modifications can be sent as pull-requests.
Not quite there yet
There are many things that should be improved.. Like:
No private browsing detection. Recently made easy, hopefully.
Command-panel:
- Doesn’t keep out external CSS.
- Placing not perfect, and not movable or any such.
Should be easier to add your own commands.
Mirrorer only keeps automatic/manual mirroring separate. A more wholesome approach would be better. Also viewing it, would be nice to just essentially browse the directories.
Server itself should provide more docs.
Those things probably most directly affect experience but then the below are important too.
Alt_require to narrow down what lua packages are able to do.
Use
page_html.util.exec
less.(at least it all goes through there now)The
Formulator
thing generating lua seems to work fine, I have a much better way to do all the database stuff.
Hardly exhaustive, of course!
Scratching the surface
Finally, there are more tools a browser can have, and these could clearly be far more customizable. It is a ghost of the functionality i want to have. I want the bookmarks to be sharable to different levels from between-friends to completely public. And preferably not with a single way of transferring the data.
I have been thinking about a overarching approach to fit that into. Applying it seemed like waiting too long to release it, but fixing the things ignores the new approach, so just got rid of annoyances and did the low-hanging fruits.
The new approach is an evolution of the idea in the previous post. I’ll post about it later, that’ll discuss from square one.