Friedrich Ewald My Personal Website

Posts


  • Show full URL in Google Chrome

    To show the full URL in Chrome, right click on the address bar and check “Always show full URLs”. This shows the http(s) portion of the URL in all cases and not only the domain name. Show full URL in Google Chrome

  • Sunset in Daly City, California

    Sunset in Daly City, California

  • Introducing hermes: A CLI tool for Apple iMessage

    I just released the first version v0.1.0 of hermes on my Github account. Hermes is named after the Greek god - the messenger of Mount Olympus. With hermes you can analyze you iMessage display statistics of your iMessage database on the command line and extract conversations. The supported formats at this time are JSON, plain text and YAML. An example looks like this:

    $ hermes statistics
    Total messages:    100000
    Received messages: 40000
    Sent messages:     60000
    Daily Average:     45.66
    Monthly Average:   <Not available>
    Yearly Average:    <Not available>
    Chats:             30
    

    Installing hermes

    To install hermes, you can follow the instructions in the readme. There are two ways of installing hermes.
    1. Download the latest binary from the releases page. I am providing 64 bit binaries for both Intel and ARM architectures for MacOS.
    2. Build hermes from source with go install github.com/f-ewald/hermes@latest. This will get you the most up to date version.
    After installing it, you can use it with either hermes or ./hermes, depending on your installation location.

    Usage

    The simplest way to get started is to call hermes directly and follow the instructions from the help. At the moment, there are two main commands available: statistics and conversations.
    % ./hermes
    Hermes is a command-line interface for iMessage databases.
    You can use it to analyze and display retrieveConversations and view statistics.
    
    Usage:
      hermes [command]
    
    Available Commands:
      check        Validate the environment
      completion   Generate the autocompletion script for the specified shell
      conversation Show retrieveConversations, find participants
      help         Help about any command
      statistics   Display message statistics
    
    Flags:
          --config string     config file (default is $HOME/.hermes.yaml)
      -d, --database string   Full path to the chat database if it is different than the default path.
      -h, --help              help for hermes
      -o, --output string     The output format. Can be either json, yaml or text (default "text")
    
    Use "hermes [command] --help" for more information about a command.
    
    You can view statistics with the statistics command. To display conversations, use the conversations list command. This returns a list of all conversations sorted by internal id together with the participants. If this is a one-to-one conversation, there will be only one participant. Group conversations have multiple participants. To show the conversation, use the conversation get <id> command. Replace <id> with the unique conversation identifier that can be obtained from the list command. The conversation will contain the participants and all messages ordered by date. Each message is prefixed with the unique participant identifier.

    Troubleshooting

    The most common issue is that there is no access to the iMessage database due to MacOS’ system restrictions. This can be solved by giving the terminal “Full Disk Access” in the system settings und the “Security Tab”. Full Disk Access in the System security settings

    Future plans

    I am planning to write tests for main parts of the software. Right now, there are no known bugs, but is not in an ideal state. After this, I am planning to improve the help and access to the database. Due to MacOS’ increased security features over the last years, you currently need to give your terminal full disk access or copy the database to another location, both of those approaches are not ideal.

    Contributing/Bug Reporting

    If you want to contribute to hermes, feel free to get in touch with me or create a pull request on Github. If you have any interesting ideas for statistics that you would like to display but don’t know how to implement them, you can also get in touch with me via email via hello@.

  • Go 1.18 supports generics

    Go (finally) supports generics in the version 1.18. My favorite editor, GoLand, took a while to fully adopt generics. I have played around with them over the past days and like them so far. Although almost nothing beats the simplicity of interface{}, I do like the warnings when the wrong type is being used. I am curious to see when the popular libraries adopt generics.

  • My minimal CoreDNS config

    I am using the following minimal CoreDNS config, savd as Corefile. This applies a one hour cache to all requests before forwarding the to the Google DNS servers. All requests are logged to stdout. In my setup this saves me about 20ms for every DNS roundtrip and improves my internet speed by quite a bit.

    . {
        cache 3600
        forward . 8.8.8.8:53 8.8.4.4:53
        log
    }
    

Page: 18 of 28