Git Product home page Git Product logo

1history's Introduction

1History

https://img.shields.io/crates/v/onehistory.svg https://github.com/1History/1History/actions/workflows/CI.yml/badge.svg

All your history in one file.

1History is a command line tool to backup your different browser histories into one file, and visualize them!

https://api.producthunt.com/widgets/embed-image/v1/review.svg?post_id=329191&theme=light

Features

  • Rich dashboards to visualize your history
  • Export as CSV file
  • Entirely offline, No need to worry about privacy leaks
  • Support Chrome/Firefox/Safari on macOS/Linux/Windows
  • Well-designed schemas to avoid history duplication when backup multiple times
  • No NPM, 1History is a single binary built mainly in Rust🦀

Screenshots

Daily Page View

screenshots/daily_pv.png

Top 10 Title

screenshots/top10_title.png

Top 10 Domain

screenshots/top10_domain.png

Usage

onehistory 0.1.0

USAGE:
    onehistory [OPTIONS] <SUBCOMMAND>

OPTIONS:
    -d, --db-file  <DB_FILE>           Database path [env: OH_DB_FILE=] [default: ~/onehistory.db]
    -h, --help                         Print help information
    -v, --verbose
    -V, --version                      Print version information

SUBCOMMANDS:
    backup    Backup browser history to 1History
    export
    help      Print this message or the help of the given subcommand(s)
    serve     Start HTTP server to visualize history
    show      Show default history files on your computer

Backup

USAGE:
    onehistory backup [OPTIONS]

OPTIONS:
    -d, --disable-detect
            Disable auto detect history files

    -D, --dry-run


    -f, --history-files <HISTORY_FILES>
            SQLite file path of different browsers(History.db/places.sqlite...)

    -h, --help
            Print help information

backup is the main subcommand, it will import browser history into 1History.

1History will automatically detect history of different browsers by default, show subcommand will show what it can find.

Users can also use -f option to set other history files to backup, the history file has the following naming convention:

BrowserHistory Filename
ChromeHistory
Firefoxplaces.sqlite
SafariHistory.db
# -f can be used multiple times
# -d is required when doing backup with browsers open
onehistory backup -d -f ~/some-dir/History.db -f ~/another-dir/places.sqlite

Serve

After backup browser history into 1History, the next step is to visualize those data.

serve subcommand will start a HTTP server at http://127.0.0.1:9960, open this in your browser to explore.

Installation

Homebrew

brew install 1History/onehistory/onehistory

Binary

The release page includes precompiled binaries for Linux, macOS and Windows.

Cargo

cargo install onehistory

Changelog

See CHANGELOG

FAQ

Error code 5: The database file is locked
This error happens if your browser is opened during backup, as SQLite allow only one open connection.

Close the browser is one solution, or you can copy history file to other directory other than default location.

LICENSE

Copyright (c) 2022 Jiacai Liu <[email protected]>

1History is distributed under GPL-3.0 license.

1history's People

Contributors

jiacai2050 avatar panekj 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

1history's Issues

Hello can you update this feature into history master

  • Hello 大佬,两年之前就使用了你制作的 history master. 的插件。真的很棒 ,然后看到你又更新了新工具。所以过来尝鲜,测试一波。
  • 想问问大佬,有没有可能,把这个功能也集成到 history master上。

Can not build project

$ cargo run
error: the 'cargo' binary, normally provided by the 'cargo' component, is not applicable to the '1.58-x86_64-unknown-linux-gnu' toolchain

May be change to 1.58.1 toolchain channel?

[Bug] URL is not wrapped within double quotes in the exported CSV

If the URL contains commas (,), the number of columns in the exported CSV will be greater than 4. In most URLs, commas are percent-encoded, so this does not cause problems.

However, there are exceptions. For example, Data URLs contain commas. Commas in Data URLs are not percent-encoded, so URL columns in the exported CSV will contain commas as they are.

20xx-xx-xx 00:00:00,page title,https://example.com/foo/bar,0
20xx-xx-xx 01:00:00,page title,data:text/html,%3Ch1%3EHello%2C%20World%21%3C%2Fh1%3E,0

The second line of this CSV contains four commas, unintentionally increasing the number of columns to five.

In standard CSV, values containing commas are wrapped with double quotes. Therefore, I think that URLs containing commas in exported CSV files should also be wrapped within double quotes.

20xx-xx-xx 00:00:00,page title,https://example.com/foo/bar,0
20xx-xx-xx 01:00:00,page title,"data:text/html,%3Ch1%3EHello%2C%20World%21%3C%2Fh1%3E",0

Or, I think TSV export should be supported as well. The possibility of tab characters being included in the URL should be infinitesimally small. So TSV would not cause this problem.

20xx-xx-xx 00:00:00	page title	https://example.com/foo/bar	0
20xx-xx-xx 01:00:00	page title	data:text/html,%3Ch1%3EHello%2C%20World%21%3C%2Fh1%3E	0

Add a progress bar for import

Please add a progress bar for the import step. It took 30 minutes to import "Imported:304535" items (Firefox latest on Linux). I thought the app had crashed or was stuck.

there is no Microsoft edge history

➜ ~ onehistory show [2022-02-16T13:06:47Z INFO onehistory] found:/Users/ilangge/Library/Safari/History.db [2022-02-16T13:06:47Z INFO onehistory] found:/Users/ilangge/Library/Application Support/Google/Chrome/Default/History [2022-02-16T13:06:47Z INFO onehistory] found:/Users/ilangge/Library/Application Support/Firefox/Profiles/dbrjzh8l.dev-edition-default/places.sqlite [2022-02-16T13:06:47Z INFO onehistory] Total:3

the default browser on my macos is microsoft edge,but there is no history with 1History backup . Why ?
there also is no document to info how to backup edge history .

onehistory backup error

I download 1History_v0.2.1_x86_64-apple-darwin.zip and run on macOS 12.2
command ./onehistory backup output:

➜  1History_v0.2.1_x86_64-apple-darwin ./onehistory backup
[2022-02-11T04:41:19Z ERROR onehistory] /Users/xxx/Library/Safari/History.db persist failed, err: open

    Caused by:
        0: /Users/xxx/Library/Safari/History.db
        1: unable to open database file: /Users/xxx/Library/Safari/History.db
        2: Error code 14: Unable to open the database file
[2022-02-11T04:41:24Z ERROR onehistory] /Users/xxx/Library/Application Support/Google/Chrome/Default/History persist failed, err: open

    Caused by:
        0: detect /Users/xxx/Library/Application Support/Google/Chrome/Default/History
        1: database is locked
        2: Error code 5: The database file is locked
[2022-02-11T04:41:24Z ERROR onehistory] /Users/xxx/Library/Application Support/Google/Chrome/Guest Profile/History persist failed, err: open

    Caused by:
        0: detect /Users/xxx/Library/Application Support/Google/Chrome/Guest Profile/History
        1: Query returned no rows
[2022-02-11T04:41:24Z ERROR onehistory] /Users/xxx/Library/Application Support/Google/Chrome/System Profile/History persist failed, err: open

    Caused by:
        0: detect /Users/xxx/Library/Application Support/Google/Chrome/System Profile/History
        1: Query returned no rows
[2022-02-11T04:41:24Z INFO  onehistory] Summary
    Found:0, Imported:0, Duplicated: 0

when I use ./onehistory serve, Chrome show {"code":500,"message":"min_max_time"}

Feature Request: Repopulate charts when you filter out a domain

Current Behavior:

When you click on a top 10 object it filters it out of the chart leaving it with the top 9

Desired Behavior:

When you click on a top 10 object it filters it out of the chart and promotes the 11th ranked object so that their are still 10 in the chart.

display search results chronologically

Currently when searching for something, you only get the top sites by page title. And if you're looking for something that's not in the most visited titles, you have to click on each node in the graph and check those, which is not optimal.

Displaying the search results chronologically would solve this, it's also how history results are always displayed.

Also clicking on a site in the top sites graph, could display results from that domain, as otherwise it doesn't really help in finding the URL you're looking for.

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.