Code Monkey home page Code Monkey logo

promnesia's Introduction

Quick links: Motivation | Feature guide | *Demos* | How does it work? | *Install* | Try it out & Setup | Glossary | FAQ | Support | Troubleshooting guide | Developer’s guide

Promnesia is a browser extension for Chrome/Firefox (including Firefox for Android!) which serves as a web surfing copilot, enhancing your browsing history and web exploration experience.

TLDR: it lets you explore your browsing history in context: where you encountered it, in chat, on Twitter, on Reddit, or just in one of the text files on your computer. This is unlike most modern browsers, where you can only see when you visited the link.

It allows you to answer different questions about the current web page:

  • have I been here before? When? demo (30 s) demo (40s)
  • how did I get on it? Which page has led to it? demo (40s)
  • why have I bookmarked it? who sent me this link? Can I just jump to the message? demo (30s)
  • or, can I jump straight into the file where the link occurred? demo (20s)
  • which links on this page have I already explored? demo (30s),
  • which posts from this blog page have I already read? demo (20s)
  • have I annotated it? demo (1m)
  • how much time have I spent on it? screenshot
  • and it also works on your phone! screenshot

See feature guide for more information.

You can jump straight to the Demos and Install sections if you’re already overexcited.

Motivation

See a writeup on history and the problems Promnesia is solving. Here’s a short summary.

  • Has it ever occurred to you that you were reading an old bookmark or some lengthy blog post and suddenly realized you had read it already before? It would be fairly easy to search in the browser history, however, it is only stored locally for three months.
  • Or perhaps you even have a habit of annotating and making notes elsewhere? And you wanna know quickly if you have the current page annotated and display the annotations. However, most services want you to use their web apps even for viewing highlights. You don’t know if you have highlights, unless you waste time checking every page.
  • Or you have this feeling that someone sent you this link ages ago, but you don’t remember who and where.
  • Or you finally got to watch that thing in your ‘Watch later’ youtube playlist, that’s been there for three years, and now you want to know why did you add it in the first place.

Then this tool is for you.

Demos

See feature guide if you’re wondering how something specific here works.

  • https://karlicoss.github.io/promnesia-demos/screens/promnesia andy Screenshot at 2020-06-05 23-33-07.png
    • a green eye means that the link was visited before and has some contexts, associated with it. When you click on it, the sidebar opens with more information about the visits.
    • You can see that I’ve sent the link to Jane on Telegram (#1)
    • I’ve annotated the link on Instapaper and highlights (#3) is marked with yellow right within the page

      Normally in order to see see your Instapaper highligths you have to go to the web app first!

    • I’ve clipped some content to my personal notes at some point (#8), the selected text was matched and highlighted as well

      If I click notes/ip2org.org, it will cause my Emacs to open and jump to the file, containing this note.

  • https://karlicoss.github.io/promnesia-demos/screens/promnesia universal love Screenshot at 2020-06-05 23-18-38.png
    • I have a note about the page in my personal notes on my filesystem (#2)
    • I chatted with a friend and sent them the link at some point (#6)

      Clicking on the link will open Telegram and jump straight to the message where the link was mentioned. So you can reply to it without having to search or scroll over the whole chat history.

    • I’ve tweeted about this link before (#11)

      Similarly, clicking would jump straight to my tweet.

    • I also have this link annotated via Hypothesis (#4, #12, #13)
  • Annotated demo of sidebar with direct & child visits, and ‘visited’ marks (click to zoom)
  • Annotated demo of highlight and locator features (click to zoom)

How does it work?

Promnesia consists of three parts:
  • browser extension
    • neatly displays the history and other information in a sidebar
    • handles highlights
    • provides search interface

    However, browser addons can’t read access your filesystem, so to load the data we need a helper component:

  • server/backend: promnesia serve command

    It’s called ‘server’, but really it’s just a regular program with the only purpose to serve the data to the browser. It runs locally and you don’t have to expose it to the outside.

  • indexer: promnesia index command

    Indexer goes through the sources (specified in the config), processes raw data and extracts URLs along with other useful information.

    Another important thing it’s doing is normalising URLs to establish equivalence and strip off garbage. I write about the motivation for it in “URLs are broken”.

You might also want to skim through the glossary if you want to understand deeper what information Promnesia is extracting.

Data sources

Promnesia ships with some builtin sources. It supports:

  • data exports from online services: Reddit/Twitter/Hackernews/Telegram/Messenger/Hypothesis/Pocket/Instapaper, etc.

    It heavily benefits from HPI package to access the data.

  • Google Takeout/Activity backups
  • Markdown/org-mode/HTML or any other plaintext on your disk
    • for ex. local personal knowledge bases - Logseq (example config), Obsidian
  • in general, anything that can be parsed in some way
  • you can also add your own custom sources, Promnesia is extensible

See SOURCES for more information.

Data flow

Here’s a diagram, which would hopefully help to understand how data flows through Promnesia.

See HPI section on data flow for more information on HPI modules and data flow.

Also check out my infrastructure map, which is more detailed!

┌─────────────────────────────────┐ ┌────────────────────────────┐ ┌─────────────────┐
│ 💾       HPI sources            │ │  💾    plaintext files      │ │  other sources  │
│ (twitter, reddit, pocket, etc.) │ │ (org-mode, markdown, etc.) │ │ (user-defined)  │
└─────────────────────────────────┘ └────────────────────────────┘ └─────────────────┘
                                ⇘⇘              ⇓⇓               ⇙⇙
                                 ⇘⇘             ⇓⇓              ⇙⇙
                                 ┌──────────────────────────────┐
                                 │ 🔄    promnesia indexer      │
                                 |        (runs regularly)      │
                                 └──────────────────────────────┘
                                                ⇓⇓
                                 ┌──────────────────────────────┐
                                 │ 💾    visits database        │
                                 │       (promnesia.sqlite)     │
                                 └──────────────────────────────┘
                                                ⇓⇓
                                 ┌──────────────────────────────┐
                                 │ 🔗    promnesia server       │
                                 |       (always running)       |
                                 └──────────────────────────────┘
                                                ⇣⇣
                                 ┌─────────────────────────────────┐
         ┌───────────────────────┤  🌐      web browser            ├────────────────────┐
         │  💾 browser bookmarks ⇒      (promnesia extension)      ⇐  💾 browser history |
         └───────────────────────┴─────────────────────────────────┴────────────────────┘

Install

  • extension:
    • Chrome: desktop version. Unfortunately mobile Chrome doesn’t support web extensions.
    • Firefox: desktop and Android
    • you can also find ‘unpacked’ versions in Releases

      It can be useful because Chrome Web Store releases might take days to approve, but in general the store version if preferrable.

  • backend

    Note that Promnesia can work without the backend, so technically this step is optional. But then it will only be able to use browser visits and browser bookmarks, so the benefits of the extension will be limited.

    • simplest: install from PyPi: pip3 install --user promnesia
      • install optional dependencies with: pip3 install --user bs4 lxml mistletoe logzero
    • alternatively: you can clone this repository and run it as scripts/promnesia

      This is mainly useful for tinkering with the code and writing new modules.

    You might also need some extra dependencies. See “Extra dependencies” for more info.

    As for supported operating systems:

    • Linux: everything is expected to work as it’s what I’m using!
    • OSX: expected to work, but there might be issues at times (I don’t have any macs so working blind here). Appreciate help!

      You might want to run brew install libmagic for proper MIME type detection.

    • Windows: at the moment doesn’t work straightaway (I don’t have any Windows to test against), there is an open issue describing some workarounds.
    • Android: allegedly, possible to run with Termux! But I haven’t got to try personally.

Try it out

You can try out Promnesia with the extension only, it uses browser history and bookmarks as data sources. However, Promnesia’s main power is using data from external sources, and for that you’ll need to run the indexer and backend (more on it in the next section).

The easiest way to try this mode is to run promnesia demo command, it can give you a sense of what Promnesia is doing with zero configuration.

  1. Install the extension and the server (PIP package), in case you haven’t already
  2. Run promnesia demo https://github.com/karlicoss/exobrain

    This clones the repository, (my personal wiki in this case), extracts the URLs, and runs on the port 13131 (default, can be specified via --port)

    You can also use a path on your local filesystem (e.g. directory with text files), or a website URL.

  3. After that, visit https://www.reddit.com

    If you press the extension icon, you will see the pages from my blog where I link to posts on Reddit.

Setup

To get the most benefit from Promnesia, it’s best to properly setup your own config, describing the sources you want it to use. If something is unclear, please feel free to open issues or reach me, I’m working on improving the documentation. Also check out troubleshooting guide or open discussions on documentation.

  • create the config: promnesia config create

    The command will put a stub promnesia config in your user config directory, e.g. ~/.config/promnesia/config.py on Linux. (it’s possibly different on OSX and Windows, see this if you’re not sure). If you wish to specify a custom location, you can set the PROMNESIA_CONFIG environment variable or pass the --config flag.

  • edit the config and add some sources

    You can look at an example config, or borrow bits from an annotated configuration example here: doc/config.py.

    The only required setting is:

    • SOURCES

      SOURCES specifies the list of data sources, that will be processed and indexed by Promnesia.

      You can find the list of available sources with more documentation on each of them here: SOURCES.

    If you want to learn about other settings, the best way at the moment (apart from reading the source) is, once again, example config.

    • [optional] check the config

      First, you can run promnesia doctor config, it can be used to quickly troubleshoot typos and similar errors. Note that you may need to install [mypy](https://github.com/python/mypy) for some config checks.

      Next, you can use the demo mode: promnesia demo --config /path/to/config.py.

      This will index the data and launch the server immediately, so you can check that everything works as expected in your browser.

  • run the indexer: promnesia index

    At the moment, indexing is periodic, not realtime. The best is to run it via cron/systemd once or several times a day:

    # run every hour in cron
    0 * * * *      promnesia index    >/tmp/promnesia-index.log 2>/tmp/promnesisa-index.err
        

    Note: you can also pass --config /path/to/config.py explicitly if you prefer or want to experiment.

    • [optional] check the database

      Run promnesia doctor database to quickly inspect the database and check that stuff that you wanted got indexed. You might need to install sqlitebrowser first.

  • run the server: promnesia serve

    You only have to start it once, it will automatically detect further changes done by promnesia index.

    • [optional] autostart the server with promnesia install-server

      This sets it up to autostart and run in the background:

      • via Systemd for Linux
      • via Launchd for OSX. I don’t have a Mac nearby, so if you have any issues with it, please report them!

      I think you can also use cron with @reboot attribute:

      # sleep is just in case cron starts up too early. Prefer systemd script if possible!
      @reboot     sleep 60 && promnesia serve   >/tmp/promnesia-serve.log 2>/tmp/promnesia-serve.err
              

      Alternatively, you can just create a manual autostart entry in your desktop environment.

    • [optional] check that the server is responding promnesia doctor server
  • [optional] setup MIME handler to jump to files straight from the extension

    See a short 20s demo, and if this is something you’d like, follow the instructions in open-in-editor.

Glossary

Visit represents an ‘occurence’ of a link in your digital trace. Obviously, visiting pages in your browser results in visits, but in Promnesia this notion also captures links that you interacted with in other applications and services.

In code (python, JS), visits are reprented as class Visit (and class DbVisit).

Visits have the following fields:

  • url: hopefully, no explanation needed!

    The only required field.

  • timestamp: when the page was visited

    Required, but in the future might be optional (sometimes you don’t have a meaningful timestamp).

  • locator: what’s the origin of the visit?

    Usually it’s a permalink back to the original source of the visit.

    For example:

    • locators for a link extracted from Reddit data point straight into reddit.com interface, for the corresponding post or comment
    • locators for a link extracted a local file point straight into these files on your disk. Clicking on the locator will open your text editor via MIME integration

    Required, but in the future might be optional. (TODO also rename to ‘origin’??)

  • context: what was the context, in which the visit occurred?

    For example:

    • context for Telegram visits is the message body along with its sender
    • context for a link from org-mode file is the whole paragraph (outline), in which it occurred

    I usually call a visit without a context ‘boring’ – it doesn’t contain much information except for the mere fact of visiting the page before. However they are still useful to have, since they fill in the gaps and provide means of tracing through your history.

    Optional.

  • duration: how much we have spent on the page

    Somewhat experimental field, at the moment it’s only set for Chrome (and often not very precise).

    Optional.

Digression: now that you have an idea what is a Visit, you can understand few more things about Promnesia:

  • source (or indexer) is any function that extract visits from raw files and generates a stream of visits (i.e. Iterable[Visit]).
  • promnesia indexer goes through the sources, specified in config, collects the visits and puts in the database
  • promnesia server reads visits form the database, and sends them to the extension

Now let’s consider some concrete examples of different kinds of Visits:

  • Google Takeout indexer

    Results in visits with:

    • url
    • timestamp
    • locator

    There isn’t any context for visits from takeout, because it’s basically a fancy database export.

  • Instapaper indexer

    Generates a visit for each highlight on the page:

    • url: original URL of the annotated page
    • timestamp: time when you created the highlight
    • locator: permalink to the highlight, bringing you into the Instapaper web app
    • context: highlight body
  • Markdown indexer

    Extracts any links it finds in Markdown files:

    • url: extracted link
    • timestamp: Markdown doesn’t have a well defined datetime format, so it’s just set to the file modification time.

      However, if you do have your own format, it’s possible to write your own indexer to properly take them into the account.

    • locator: links straight into the markdown file on your disk!
    • context: the markdown paragraph, containing the url

Note: this terminology is not set is stone, so if someone feels there are words that describe these concepts better, I’m open to suggestions!

FAQ

See doc/GUIDE.org#FAQ

Support

The best support for me would be if you contribute to this or my other projects. Code, ideas of feedback – everything is appreciated.

I don’t need money, but I understand it’s often easier to give away than time, so here are some of projects that I donate to:

More links

promnesia's People

Contributors

after-ephemera avatar ankostis avatar anweshgangula avatar clintgibler avatar cobertos avatar etopeter avatar gms8994 avatar halhenke avatar jakeisnt avatar karlicoss avatar koo5 avatar krillin666 avatar kvgc avatar mjsir911 avatar raphwriter avatar sandersantema avatar sanqui avatar seanbreckenridge avatar sopoforic avatar telotortium avatar unendiverse avatar volt4ire avatar yoyurec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

promnesia's Issues

systemd install tool/script?

I've had to write check_call(['systemctl', ...]) and use templating for systemd services more than I wish I had.
Can it be resolved in a more generic way?
e.g. here or here

'hug' is a package and cannot be directly executed

Now this is a weird one where I don't know how much of the problem is my machine:

$ promnesia serve
[INFO    2020-06-28 14:25:44,033 promnesia server.py:305] Running server: ['python3', '-m', 'hug', '-p', '13131', '-f', '/usr/lib/python3.7/site-packages/promnesia/server.py']
[INFO    2020-06-28 14:25:44,033 promnesia server.py:305] Running server: ['python3', '-m', 'hug', '-p', '13131', '-f', '/usr/lib/python3.7/site-packages/promnesia/server.py']
/usr/lib/python-exec/python3.7/python3: No code object available for hug.__main__; 'hug' is a package and cannot be directly executed

And doing the same command manually gives me the same problem:

$ python3 -m hug
/usr/lib/python-exec/python3.7/python3: No code object available for hug.__main__; 'hug' is a package and cannot be directly executed

Now my temporary solution to this is removing the python3 -m from the command, because a hug executable exists and does things properly:

$ hug
Error: must define a file name or module that contains a Hug API

Now the question is basically: do other systems have hug in the $PATH? Am I doing something weird where I can't execute hug with python3 -m hug on my (gentoo) system?

better timezone display?

E.g. it might be reasonable to display original timezone that comes from the backend instead of converting into local timezone?
It impacts 'collapsing' logic (when close timestamps converted in a range), also local browser history doesn't know your past timezone. But perhaps it's a minor.

Custom sources

You mentioned:

data exports from online services: Reddit/Twitter/Hackernews/Telegram/Messenger/Hypothesis/Pocket/Instapaper, etc

In which format can the sources be? In your config.py example you wrote

SOURCES = [
    Source(
        auto.index,
        # just some arbitrary directory with html files

But could these sources be ORG files or any text file?
Thanks,
GM

Help with creating your own config.py

Hi, excellent tool.
I would appreciate more indications for those who are not programmers. For instance "create your own config cp config.py.example config.py, edit config.py, and configure existing or custom sources". How do I go about creating my own file? WHat sources in which format to add to the file? If you could give me an example, it would be great. Thanks.

Non-systemd linux boxes: fail nicer or handle better.

Hello,

On my non-systemd linux machine when I run promnesia install-server it complains with a pretty ugly traceback:

Writing launch script to /home/msirabella/.config/systemd/user/promnesia.service
Something has gone wrong... you might want to use 'journalctl --user -u promnesia.service' to investigate
Traceback (most recent call last):
  File "/usr/bin/promnesia", line 11, in <module>
    load_entry_point('promnesia==0.11.20200605', 'console_scripts', 'promnesia')()
  File "/usr/lib/python3.7/site-packages/promnesia/__main__.py", line 261, in main
    install_server.install(args)
  File "/usr/lib/python3.7/site-packages/promnesia/misc/install_server.py", line 122, in install
    install_systemd(name=name, out=out, launcher=launcher, largs=largs)
  File "/usr/lib/python3.7/site-packages/promnesia/misc/install_server.py", line 77, in install_systemd
    raise e
  File "/usr/lib/python3.7/site-packages/promnesia/misc/install_server.py", line 70, in install_systemd
    systemd('stop' , unit_name, method=run) # ignore errors here if it wasn't running in the first place
  File "/usr/lib/python3.7/site-packages/promnesia/misc/install_server.py", line 54, in systemd
    'systemctl', '--no-pager', '--user', *args,
  File "/usr/lib/python3.7/subprocess.py", line 488, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'systemctl': 'systemctl'

It is obvious that it is trying to do systemd things, and while I don't exactly know what to expect install-server to do on a non-systemd machine, perhaps this can fail a bit nicer?

I see there is already some code for unsupported systems in install_server.py, maybe just non-systemd machines can fail the same way.

I can help with a PR if you give me some pointers here, this fix seems simple enough.

Secuity audit?

Nothing worries me specifically (especially considering local first approach).
But perhaps someone has good ideas on better defaults or
After all, you send around your browser history.
Related: #2

extension: allow running without the backend, improve error message

At the moment if backend isn't running, user ends up with cryptic "ERROR: Failed to fetch". At the very list, could point to readme and mention they need to run the backend.

In addition, there is some value in running against just local browser history too, so we could be defensive and work with them even without the backend visits. This will require a change somewhere here

Although not sure all queries are possible with local history APIs, but looks doable

For hierarchical queries, this will also require a change to the way visits are treated, at the moment local visits are considered 'boring. Perhaps a toggle to treat certain sources as 'interesting'?

(see https://news.ycombinator.com/item?id=23672393)

Share database between machine?

Hi, I really love this and I want to fully incorporated it into my workflow. My situation is that I have a machine at work and one at home, can both of these machines share a single sqlite database? Obviously while I'm at work, no one uses the machine at home (though I still keep the machine running) so I guess there would be no conflict or blocking of database. However, I'm not that familiar with sqlite so there maybe problems that I'm not aware of.

Have anybody trying this? if this is not possible, is there anyway to run this in a server securely so I can connect my devices to?

Find a generic way to disable extensions on security critical websites (e.g. banks)

Since extension is sending urls to the backend, it's potentially not secure to do so on websites like banks. While extension supports blacklisting it's not really great to rely on user to do so.

Perhaps some of these lists https://github.com/cbuijs/shallalist would be a good start, unclear how often is it updated though.

Also need to add a UI explanation if the link is blacklisted; and an option to whitelist urls from the 'default' lists in case user really really wants it.

use more stuff from Google Takeout?

E.g. search history per se is not useful perhaps, but having it around is quite convenient as a means of answering 'How did I get on this page?'.

Not compatible with iOS Firefox mobile

Trying to install Promnesia extension for Firefox on my iPhone and getting message:

  • This add-on is not compatible with this browser. Try installing it on Firefox for desktop.

Firefox 27.0 (18428)
iOS 14.0
Model name iPhone SE
Model number MP7T2LL/A

real time indexing

E.g. something inotify based. That would make the implementation quite a bit more complext that it's at the moment.
Also due to the nature of many exports (periodic), it won't be realtime unless the underlying exports are realtime.
Still it could at least detect source files changes, etc.
Also would work well in conjunction with Grasp.

Improve setup process

I just discovered this project depends in a way of another projects created by you: HPI and kython.

So, I'm doing a test and I replaced the config.py.example to the config found on: https://github.com/karlicoss/promnesia/blob/master/doc/config.py

So I got this:

klaudioz@wsb-server:~/promnesia$ ./scripts/promnesia demo --port 13131 --config config.py
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 192, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/klaudioz/promnesia/src/promnesia/__main__.py", line 180, in <module>
    main()
  File "/home/klaudioz/promnesia/src/promnesia/__main__.py", line 173, in main
    do_demo(index_as=getattr(args, 'as'), params=args.params, port=args.port, config_file=args.config)
  File "/home/klaudioz/promnesia/src/promnesia/__main__.py", line 100, in do_demo
    config.load_from(config_file)
  File "/home/klaudioz/promnesia/src/promnesia/config.py", line 56, in load_from
    instance = import_config(config_file)
  File "/home/klaudioz/promnesia/src/promnesia/config.py", line 72, in import_config
    spec.loader.exec_module(mod) # type: ignore
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "config.py", line 26, in <module>
    from promnesia.sources import takeout, instapaper, pocket, fbmessenger, twitter, roamresearch, hypothesis
  File "/home/klaudioz/promnesia/src/promnesia/sources/takeout.py", line 10, in <module>
    from my.kython.kompress import kexists, kopen
ModuleNotFoundError: No module named 'my.kython'; 'my' is not a package

After that I realized the existence of kython. I cloned the repository, I run: pip install -r requirements.txt but I don't know what else to do to make work promnesia with this config file.

Obviously I'm interested to use promnesia but with its maximum power, integrating it with the most of platforms I use.

Do not specify DB option when installing server if no path is provided

This is likely a problem with other methods, but I encountered it with systemd and so will just talk about the problem in that context.

In the process of templating the unit file, if a db path is not provided, the config will turn out something like this:

[Unit]
Description=Promnesia browser extension backend

[Install]
WantedBy=default.target

[Service]
ExecStart=/home/{user}/.local/bin/promnesia serve --db None --timezone Canada/Eastern --port 13131
Type=simple
Restart=always

The problem with this is that None argument for the db there is just interpreted as the string "None" instead of the object None when the server is started, and so all the conditionals with db is None fail, and when the server attempts to load the db it throws an AssertionError because it can't find the db at path "None"

I fixed this in my local setup by deleting the --db None argument from the unit file, but when an argument is None it should probably just be omitted from the unit file entirely.

Promnesia on MacOS

Привет, буду писать по русски, чтобы более точно выразить мысль.

На MacOS поставить backend не удается, постоянно при запуске pip3 пытается запуститься pip от второй версии. Что приводит к ошибке:

~
✦ at [ 15:17:18 ]  ❯ pip3 install --user promnesia
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting promnesia
  Downloading promnesia-0.11.20200510.tar.gz (344 kB)
     |████████████████████████████████| 344 kB 1.6 MB/s
    ERROR: Command errored out with exit status 1:
     command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ss/g0zcdcj13p54s6fj2353vlxh0000gn/T/pip-install-ks_GI5/promnesia/setup.py'"'"'; __file__='"'"'/private/var/folders/ss/g0zcdcj13p54s6fj2353vlxh0000gn/T/pip-install-ks_GI5/promnesia/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/ss/g0zcdcj13p54s6fj2353vlxh0000gn/T/pip-pip-egg-info-dOQXj3
         cwd: /private/var/folders/ss/g0zcdcj13p54s6fj2353vlxh0000gn/T/pip-install-ks_GI5/promnesia/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/ss/g0zcdcj13p54s6fj2353vlxh0000gn/T/pip-install-ks_GI5/promnesia/setup.py", line 41
        *DEPS_INDEXER,
        ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Установив [email protected] через brew и установив promnesia через явный вызов полного пути до pip3, удалось поставить promnesia, но затем при попытке использования получил массу ошибок при запуске, по всей видимости дополнительные пакеты не были обнаружены.

Для чистоты эксперимента создал docker-версию Promnesia: juev/promnesia-docker. При запуске команды:

docker-compose up --build

собирается и запускается контейнер. При запуске используется конфигурационный файл из примеров. Указывается использование директории /data для хранения базы и файлов. И именно эта директория монтируется к хосту. Но при запуске файлы не создаются и при использовании расширения получаю ошибку:

✦ at [ 16:03:21 ]  ❯ docker-compose up --build
Building promnesia
Step 1/6 : FROM python:3
 ---> 659f826fabf4
Step 2/6 : WORKDIR /usr/src/app
 ---> Using cache
 ---> 0ae916acc38b
Step 3/6 : COPY requirements.txt ./
 ---> Using cache
 ---> 0432b193d16d
Step 4/6 : COPY config.py /
 ---> 4f699ac7631b
Step 5/6 : RUN pip install --no-cache-dir -r requirements.txt
 ---> Running in 855c787f61b2
Collecting promnesia
  Downloading promnesia-0.11.20200521-py3-none-any.whl (53 kB)
Collecting logzero
  Downloading logzero-1.5.0-py2.py3-none-any.whl (14 kB)
Collecting pytz
  Downloading pytz-2020.1-py2.py3-none-any.whl (510 kB)
Collecting sqlalchemy
  Downloading SQLAlchemy-1.3.17-cp38-cp38-manylinux2010_x86_64.whl (1.3 MB)
Collecting hug
  Downloading hug-2.6.1-py2.py3-none-any.whl (75 kB)
Collecting cachew
  Downloading cachew-0.6.3-py3-none-any.whl (12 kB)
Collecting urlextract
  Downloading urlextract-0.14.0-py3-none-any.whl (18 kB)
Collecting more-itertools
  Downloading more_itertools-8.3.0-py3-none-any.whl (44 kB)
Collecting python-magic
  Downloading python_magic-0.4.18-py2.py3-none-any.whl (8.6 kB)
Collecting tzlocal
  Downloading tzlocal-2.1-py2.py3-none-any.whl (16 kB)
Collecting falcon==2.0.0
  Downloading falcon-2.0.0-py2.py3-none-any.whl (163 kB)
Collecting requests
  Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)
Collecting uritools
  Downloading uritools-3.0.0-py3-none-any.whl (12 kB)
Collecting appdirs
  Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting idna
  Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
Collecting certifi>=2017.4.17
  Downloading certifi-2020.4.5.1-py2.py3-none-any.whl (157 kB)
Collecting chardet<4,>=3.0.2
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Downloading urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
Installing collected packages: pytz, sqlalchemy, falcon, idna, certifi, chardet, urllib3, requests, hug, cachew, uritools, appdirs, urlextract, more-itertools, python-magic, tzlocal, promnesia, logzero
Successfully installed appdirs-1.4.4 cachew-0.6.3 certifi-2020.4.5.1 chardet-3.0.4 falcon-2.0.0 hug-2.6.1 idna-2.9 logzero-1.5.0 more-itertools-8.3.0 promnesia-0.11.20200521 python-magic-0.4.18 pytz-2020.1 requests-2.23.0 sqlalchemy-1.3.17 tzlocal-2.1 uritools-3.0.0 urlextract-0.14.0 urllib3-1.25.9
Removing intermediate container 855c787f61b2
 ---> f7f4a3fc55d6
Step 6/6 : CMD [ "promnesia", "serve", "--db", "/config.py" ]
 ---> Running in 6372776476d7
Removing intermediate container 6372776476d7
 ---> 3aecd1bca750

Successfully built 3aecd1bca750
Successfully tagged promnesia-docker_promnesia:latest
Recreating promnesia ... done
Attaching to promnesia
promnesia    | [INFO    2020-05-23 13:06:11,996 promnesia server.py:295] Running server: ['python3', '-m', 'hug', '-p', '13131', '-f', '/usr/local/lib/python3.8/site-packages/promnesia/server.py']
promnesia    | [INFO    2020-05-23 13:06:21,741 promnesia server.py:123] url: https://www.gwern.net/
promnesia    | [INFO    2020-05-23 13:06:21,743 promnesia server.py:126] normalised url: gwern.net
promnesia    | [INFO    2020-05-23 13:06:21,745 promnesia server.py:99] Reloading DB: PathWithMtime(path=PosixPath('/config.py'), mtime=1590239156.0)
promnesia    | [INFO    2020-05-23 13:06:21,765 promnesia server.py:132] query: SELECT visits.norm_url, visits.orig_url, visits.dt, visits.locator_title, visits.locator_href, visits.src, visits.context, visits.duration
promnesia    |     FROM visits
promnesia    |     WHERE visits.norm_url = ? OR visits.context IS NOT NULL AND (visits.norm_url LIKE ? || '%' ESCAPE '/')
promnesia    | Traceback (most recent call last):
promnesia    |   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1283, in _execute_context
promnesia    |     self.dialect.do_execute(
promnesia    |   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute
promnesia    |     cursor.execute(statement, parameters)
promnesia    | sqlite3.DatabaseError: file is not a database
promnesia    |
promnesia    | The above exception was the direct cause of the following exception:
promnesia    |
promnesia    | Traceback (most recent call last):
promnesia    |   File "/usr/local/lib/python3.8/wsgiref/handlers.py", line 137, in run
promnesia    |     self.result = application(self.environ, self.start_response)
promnesia    |   File "/usr/local/lib/python3.8/site-packages/falcon/api.py", line 269, in __call__
promnesia    |     responder(req, resp, **params)
promnesia    |   File "/usr/local/lib/python3.8/site-packages/hug/interface.py", line 947, in __call__
promnesia    |     raise exception
promnesia    |   File "/usr/local/lib/python3.8/site-packages/hug/interface.py", line 918, in __call__
promnesia    |     self.call_function(input_parameters), context, request, response, **kwargs
promnesia    |   File "/usr/local/lib/python3.8/site-packages/hug/interface.py", line 840, in call_function
promnesia    |     return self.interface(**parameters)
promnesia    |   File "/usr/local/lib/python3.8/site-packages/hug/interface.py", line 129, in __call__
promnesia    |     return __hug_internal_self._function(*args, **kwargs)
promnesia    |   File "/usr/local/lib/python3.8/site-packages/promnesia/server.py", line 191, in visits
promnesia    |     return search_common(
promnesia    |   File "/usr/local/lib/python3.8/site-packages/promnesia/server.py", line 135, in search_common
promnesia    |     visits = [binder.from_row(row) for row in conn.execute(query)]
promnesia    |   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1020, in execute
promnesia    |     return meth(self, multiparams, params)
promnesia    |   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
promnesia    |     return connection._execute_clauseelement(self, multiparams, params)
promnesia    |   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1133, in _execute_clauseelement
promnesia    |     ret = self._execute_context(
promnesia    |   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1323, in _execute_context
promnesia    |     self._handle_dbapi_exception(
promnesia    |   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1517, in _handle_dbapi_exception
promnesia    |     util.raise_(
promnesia    |   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
promnesia    |     raise exception
promnesia    |   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1283, in _execute_context
promnesia    |     self.dialect.do_execute(
promnesia    |   File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 590, in do_execute
promnesia    |     cursor.execute(statement, parameters)
promnesia    | sqlalchemy.exc.DatabaseError: (sqlite3.DatabaseError) file is not a database
promnesia    | [SQL: SELECT visits.norm_url, visits.orig_url, visits.dt, visits.locator_title, visits.locator_href, visits.src, visits.context, visits.duration
promnesia    | FROM visits
promnesia    | WHERE visits.norm_url = ? OR visits.context IS NOT NULL AND (visits.norm_url LIKE ? || '%' ESCAPE '/')]
promnesia    | [parameters: ('gwern.net', 'gwern.net')]
promnesia    | (Background on this error at: http://sqlalche.me/e/4xp6)
^CGracefully stopping... (press Ctrl+C again to force)
Stopping promnesia   ... done

То есть с использованием docker удалось более или менее завести backend, но с конфигурацией пока проблема и в результате база не создается.

Как понял проблема в том, что не запускался index, пересоздал файл compose, добавив вызов создания индексов (second commit), но при запуске индексирования возникает ошибка:

Attaching to promnesia-docker_promnesia-index_1, promnesia
promnesia-index_1  | Traceback (most recent call last):
promnesia-index_1  |   File "/usr/local/bin/promnesia", line 8, in <module>
promnesia-index_1  |     sys.exit(main())
promnesia-index_1  |   File "/usr/local/lib/python3.8/site-packages/promnesia/__main__.py", line 169, in main
promnesia-index_1  |     do_index(config_file=args.config)
promnesia-index_1  |   File "/usr/local/lib/python3.8/site-packages/promnesia/__main__.py", line 60, in do_index
promnesia-index_1  |     config.load_from(config_file)
promnesia-index_1  |   File "/usr/local/lib/python3.8/site-packages/promnesia/config.py", line 56, in load_from
promnesia-index_1  |     instance = import_config(config_file)
promnesia-index_1  |   File "/usr/local/lib/python3.8/site-packages/promnesia/config.py", line 72, in import_config
promnesia-index_1  |     spec.loader.exec_module(mod) # type: ignore
promnesia-index_1  |   File "<frozen importlib._bootstrap_external>", line 783, in exec_module
promnesia-index_1  |   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
promnesia-index_1  |   File "/config.py", line 11, in <module>
promnesia-index_1  |     from promnesia.sources import instapaper, pocket, twitter, roamresearch, hypothesis
promnesia-index_1  |   File "/usr/local/lib/python3.8/site-packages/promnesia/sources/instapaper.py", line 6, in <module>
promnesia-index_1  |     import my.instapaper as ip
promnesia-index_1  | ModuleNotFoundError: No module named 'my'
promnesia-docker_promnesia-index_1 exited with code 1

потратил немало времени на то, чтобы запустить promnesia на macos. Но пока безрезультатно.

Issue with running first time index on macOS

I've installed libmagic as per https://filemagic.readthedocs.io/en/latest/guide.html

denis@MacBook-Pro ~> promnesia index
/Users/denis/Library/Python/3.7/lib/python/site-packages/promnesia/kython/klogging2.py:27: UserWarning: You might want to install 'logzero' for nice colored logs!
  warnings.warn("You might want to install 'logzero' for nice colored logs!")
[INFO    2020-07-02 14:57:20,143 promnesia common.py:417] extracting via promnesia.sources.auto:index ('/usr/share/doc/python3/html/faq',) {} ... ...
[INFO    2020-07-02 14:57:20,143 promnesia common.py:417] extracting via promnesia.sources.auto:index ('/usr/share/doc/python3/html/faq',) {} ... ...
[ERROR   2020-07-02 14:57:20,149 promnesia common.py:433] indexer emitted exception
Traceback (most recent call last):
  File "/Users/denis/Library/Python/3.7/lib/python/site-packages/promnesia/sources/auto.py", line 291, in _index
    yield from _index_file(pp, opts=opts)
  File "/Users/denis/Library/Python/3.7/lib/python/site-packages/promnesia/sources/auto.py", line 317, in _index_file
    pm = mime(pp)
  File "/Users/denis/Library/Python/3.7/lib/python/site-packages/promnesia/sources/auto.py", line 26, in mime
    return _magic().from_file(str(path))
  File "/Users/denis/Library/Python/3.7/lib/python/site-packages/promnesia/sources/auto.py", line 22, in _magic
    return magic.Magic(mime=True)
TypeError: __init__() got an unexpected keyword argument 'mime'

[ERROR   2020-07-02 14:57:20,149 promnesia common.py:433] indexer emitted exception
Traceback (most recent call last):
  File "/Users/denis/Library/Python/3.7/lib/python/site-packages/promnesia/sources/auto.py", line 291, in _index
    yield from _index_file(pp, opts=opts)
  File "/Users/denis/Library/Python/3.7/lib/python/site-packages/promnesia/sources/auto.py", line 317, in _index_file
    pm = mime(pp)
  File "/Users/denis/Library/Python/3.7/lib/python/site-packages/promnesia/sources/auto.py", line 26, in mime
    return _magic().from_file(str(path))
  File "/Users/denis/Library/Python/3.7/lib/python/site-packages/promnesia/sources/auto.py", line 22, in _magic
    return magic.Magic(mime=True)
TypeError: __init__() got an unexpected keyword argument 'mime'

[INFO    2020-07-02 14:57:20,149 promnesia common.py:443] extracting via promnesia.sources.auto:index ('/usr/share/doc/python3/html/faq',) {} ...: got 0 visits
[INFO    2020-07-02 14:57:20,149 promnesia common.py:443] extracting via promnesia.sources.auto:index ('/usr/share/doc/python3/html/faq',) {} ...: got 0 visits
[INFO    2020-07-02 14:57:20,167 promnesia dump.py:51] saved database to /Users/denis/Library/Application Support/promnesia/promnesia.sqlite
[INFO    2020-07-02 14:57:20,167 promnesia dump.py:51] saved database to /Users/denis/Library/Application Support/promnesia/promnesia.sqlite

SyntaxError: invalid syntax

I can't see what I'm doing wrong.

klaudioz@wsb-server:~$ git clone https://github.com/karlicoss/promnesia.git
Cloning into 'promnesia'...
remote: Enumerating objects: 172, done.
remote: Counting objects: 100% (172/172), done.
remote: Compressing objects: 100% (100/100), done.
remote: Total 5028 (delta 85), reused 93 (delta 54), pack-reused 4856
Receiving objects: 100% (5028/5028), 1017.34 KiB | 0 bytes/s, done.
Resolving deltas: 100% (3573/3573), done.
klaudioz@wsb-server:~$ cd promnesia/
klaudioz@wsb-server:~/promnesia$ 
klaudioz@wsb-server:~/promnesia$ cp config.py.example config.py
klaudioz@wsb-server:~/promnesia$ 
klaudioz@wsb-server:~/promnesia$ ./scripts/promnesia demo --port 13131 --config config.py
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.5/runpy.py", line 142, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/klaudioz/promnesia/src/promnesia/__init__.py", line 2, in <module>
    from .common import PathIsh, Visit, Source, last
  File "/home/klaudioz/promnesia/src/promnesia/common.py", line 31
    title: str
         ^
SyntaxError: invalid syntax
klaudioz@wsb-server:~/promnesia$ python3 -V
Python 3.5.3

use bookmarklet for mobile Chrome?

Sadly, mobile Chrome doesn't support browser extensions, so bookmarklet is the only way to implement it?
Although kind of defeats the purpose of being notified automatically.

User workflow documentation / understanding how components fit together

First off, thanks so much for creating promnesia, HPI, grasp, and more! 🙏

The past few months, I've been searching for tool(s) that fit my goals for storing and easily accessing information, and reading your promnesia blog post was like reading a better, fleshed out version of what I had in my head 🙌

I'm starting to play around with the awesome ecosystem of tools you've built, but a few things currently aren't clear.

Apologies for the length of this issue 🤣 I wanted to give you some background of what I'm looking to do and my current understanding of how your various libraries work, so that hopefully the documentation can be fleshed out and made clearer for myself and others.

Happy to help document based on my experiences using it, if that'd be helpful.

Context: My Goals

To give you a bit of context, here's what I'm currently doing and what I'm looking to accomplish.

Info sources I want to store:

  • Meeting notes, personal notes, snippets from emails
  • Conference talk notes
  • Highlights and notes from PDFs, web pages, Twitter
  • Articles and their highlights from Pocket

Storage details:

  • I'd like the canonical source of all data to be in org mode files in one git repo.
  • The notes will likely be structured using some combination of org-roam and PARA.

Functionality/workflow goals:

  • I'd like to be able to easily and automatically ingest info from all of the above sources and import them into the central org mode repo.
  • When I browse the web, what I've already seen and highlighted should be easily and automatically surfaced, and it should be easy to save/highlight new things.

How it All Fits Together

I think pretty much all of the above can be done (and you're already doing) with the assorted tools and libraries you've built, per your personal infrastructure diagram.

But please permit me to summarize here to make sure I'm understanding things correctly:

  • Human Programming Interface (HPI) - Helps export data from a variety of third party services and stores them locally, as JSON/XML/etc.
    • Supports interacting with the downloaded data from any of the supported services as Python objects.
  • orger - Given input from HPI, enables exporting the data to org mode files.
    • Not totally sure about ^, but guessing based on this.
    • Supports parsing org mode files and accessing them as Python objects
  • grasp - A browser extension that "adds a button/keybinding to capture the current page title and url, possibly selected text, additional comments or tags and adds it into your Org Mode file."
  • promnesia - A browser extension that shows you relevant info about the page you're currently viewing.
    • Like which page led to the current page, if you were linked via a Telegram message, which links on a page you've already viewed, overlaying highlights from other services like Instapaper and Pocket, and more.
    • All of the relevant info and context promnesia uses is sourced from HPI (and maybe orger) based on files on your local file system.
  • open-in-editor - Enables you to click on links in the promnesia sidebar and open the relevant file in your editor.

Questions

I think one thing that's currently a bit fuzzy for me is the relationship between HPI and orger - what exactly each of them does and how they work together. Sorry if this is obvious, but can you provide any additional details?

Will promnesia show highlights and links that have been captured with grasp?

Can promnesia capture URLs/highlights, or does it just display web info that has been previously captured by grasp/Pocket/other services that have been imported by HPI/orger?

In several of the videos, you use CTRL+Alt+V to show links you've already visited, but I don't see that referenced in the README.org anywhere. Am I missing it? Does promnesia support any other hotkeys?

  • It might be useful to have a section listing hotkeys in the README.org, and potentially in the browser extension help page.

Thoughts

I think it'd be really nice to have a concise, opinionated, "here's how to get set up and use all of these parts together" guide, which I'd be happy to help with.

Most (or all) of the info is currently there, but at least to me, it doesn't seem to be all in one place (you have to reference a number of repos and blog posts), and it's not obvious how the core parts fit together, what should be set up in what order, etc.

But if this already exists, please let me know!

Thanks for your time, and for reading til the end 😅

extension: convert background to event page (persistent=false)

Initially the extension had persistent=false, but had to [revert it](See 2f2636f).

It seems to have fixed the issue with unresponsiveness that @bepolymathe reported, when you keep a tab open for a while, the extension doesn't respond to popups/sideback clicks. I could never reproduce it in Firefox, only Chrome, but @bepolymathe got it on Firefox too.

From debugging it seems that it happens after onSuspend is triggered. Apparently, some state gets lost? Maybe some callbacks leak into the sidebar/popup and then detach from the context.

I guess persistent is not so bad considering Promnesia is not too resource intensive, and other extensions do this too apparently... but might be good to get it right.

Also wonder what's a good way to debug this. How to trigger unloading manually? Waiting for some the heuristic to trigger is just infeasible (I had to use three browsers to increase the chances on reproducing in one of them).

Make sure promnesia works under Windows

Windows 10 with Python 3.7.6.

When I run promnesia demo --port 16789 https://github.com/karlicoss/exobrain
I get error:

c:\anaconda\lib\site-packages\promnesia\kython\klogging2.py:27: UserWarning: You might want to install 'logzero' for nice colored logs!
  warnings.warn("You might want to install 'logzero' for nice colored logs!")
[INFO    2020-05-18 20:49:57,102 promnesia common.py:329] extracting via promnesia.sources.guess:index ('https://github.com/karlicoss/exobrain',) {} ... ...
[INFO    2020-05-18 20:49:57,102 promnesia common.py:329] extracting via promnesia.sources.guess:index ('https://github.com/karlicoss/exobrain',) {} ... ...
Traceback (most recent call last):
  File "c:\anaconda\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\anaconda\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\anaconda\Scripts\promnesia.exe\__main__.py", line 7, in <module>
  File "c:\anaconda\lib\site-packages\promnesia\__main__.py", line 173, in main
    do_demo(index_as=getattr(args, 'as'), params=args.params, port=args.port, config_file=args.config)
  File "c:\anaconda\lib\site-packages\promnesia\__main__.py", line 110, in do_demo
    errors = _do_index()
  File "c:\anaconda\lib\site-packages\promnesia\__main__.py", line 49, in _do_index
    hist, errors = previsits_to_history(ex, src=ex.src)
  File "c:\anaconda\lib\site-packages\promnesia\common.py", line 333, in previsits_to_history
    previsits = list(extr()) # TODO DEFENSIVE HERE!!!
  File "c:\anaconda\lib\site-packages\promnesia\sources\guess.py", line 33, in index
    yield from index_(path, *args, **kwargs)
  File "c:\anaconda\lib\site-packages\promnesia\sources\vcs.py", line 15, in index
    check_call(['git', 'clone', repo, tp])
  File "c:\anaconda\lib\subprocess.py", line 358, in check_call
    retcode = call(*popenargs, **kwargs)
  File "c:\anaconda\lib\subprocess.py", line 339, in call
    with Popen(*popenargs, **kwargs) as p:
  File "c:\anaconda\lib\subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "c:\anaconda\lib\subprocess.py", line 1148, in _execute_child
    args = list2cmdline(args)
  File "c:\anaconda\lib\subprocess.py", line 555, in list2cmdline
    needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'WindowsPath' is not iterable

So how can I run this program on Windows?

Launching in demo mode results in `invalid choice: 'demo'`

New virtual environment with Python 3.6.3 on Mojave 10.14.6.

Running promnesia demo --port 16789 https://beepb00p.xyz results in:

warnings.warn("You might want to install 'logzero' for nice colored logs!")
usage: __main__.py [-h] {index,serve,adhoc} ...
__main__.py: error: argument mode: invalid choice: 'demo' (choose from 'index', 'serve', 'adhoc')

This also happens when cloning and running it directly:

(master) JonsMacbookPro:Github jonborichef$ promnesia/scripts/promnesia demo --port 16789 https://beepb00p.xyz
readlink: illegal option -- f
usage: readlink [-n] [file ...]
/Users/jonborichef/master/lib/python3.6/site-packages/promnesia/kython/klogging2.py:27: UserWarning: You might want to install 'logzero' for nice colored logs!
  warnings.warn("You might want to install 'logzero' for nice colored logs!")
usage: __main__.py [-h] {index,serve,adhoc} ...
__main__.py: error: argument mode: invalid choice: 'demo' (choose from 'index', 'serve', 'adhoc')

Let me know if any other info helpful!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.