Pyalmanac | Creates the daily pages of the Nautical almanac | Document Editor library

 by   rodegerdts Python Version: Current License: GPL-2.0

kandi X-RAY | Pyalmanac Summary

kandi X-RAY | Pyalmanac Summary

Pyalmanac is a Python library typically used in Editor, Document Editor applications. Pyalmanac has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. However Pyalmanac build file is not available. You can download it from GitHub.

Pyalmanac is nearing the end of its useful days. Almanacs generated after the next few years should not be used for navigational purposes. SFalmanac (or Skyalmanac with some restrictions regarding the accuracy of sunset/twilight/sunrise and moonrise/moonset) are the new norm as these are based on the more accurate algorithms currently employed in the NASA JPL HORIZONS System (the same algorithms are implemented in Skyfield). Pyalmanac is implemented using Ephem (originally named PyEphem), which in turn uses XEphem that uses the VSOP87D algorithms for the planets. XEphem is also 'end of life' as no further updates are planned. However the key discrepancies are related to the projected speed of Earth's rotation, or "sidereal time". Skyfield-based almanacs (SFalmanac and Skyalmanac) now use the International Earth Rotation and Reference Systems Service (IERS) Earth Orientation Parameters (EOP) data which are forecast for at least the coming 12 months (and updated weekly). Accurate assessment of "sidereal time" will minimize GHA discrepancies in general. This applies to to all celestial objects. Pyalmanac is a Python 3 script that essentially creates the daily pages of the Nautical Almanac using the UTC timescale, which is not optimal for navigation purposes :frowning_face:. Official Nautical Almanacs employ a UT timescale (equivalent to UT1). The "daily pages" are tables that are needed for celestial navigation with a sextant. Although you are strongly advised to purchase the official Nautical Almanac, this program will reproduce the tables with no warranty or guarantee of accuracy. This version of Pyalmanac was developed by Andrew Bauer based on the original Pyalmanac by Enno Rodegerdts. Various improvements, enhancements and bugfixes have been included. Pyalmanac contains its own star database (similar to the database in Ephem 3.7.6 whose accuracy was sub-optimal). It is updated with data from the Hipparcos Star Catalogue and the GHA/Dec star data now matches a sample page from a Nautical Almanac typically to within 00.1'. NOTE: Pyalmanac contains its own star database - it does not use the version supplied with Ephem, hence updating from 3.7.6 to 3.7.7.1 is harmless. Star names are chosen to comply with Nautical Almanacs. NOTE: if still required, a Python 2.7 script with similar functionality can be found at: I, Andrew Bauer, wish to thank Enno Rodegerdts for permission to update his GitHub site. Without Enno's pioneering work on the original Pyalmanac I would never have started (or known how to start) on this journey. I also thank the experts who have helped me... especially Brandon Rhodes, author of Ephem/PyEphem and Skyfield, for fixing minor issues I identified. NOTE: the Python Package Index (PyPI) edition is here: Users are encouraged to install the PyPI edition instead. Two versions (other than Pyalmanac) are available here: Ephem website: Skyfield website: A new parameter in config.py enables one to choose between A4 and Letter-sized pages. A new approach to string formatting has been implemented: the old style Python string formatting syntax has been replaced by the new style string formatting syntax. The Equation Of Time is shaded whenever EoT is negative indicating that apparent solar time is slow compared to mean solar time (mean solar time > apparent solar time). Minor changes are included here to this original (non-PyPI) edition to reflect some of the adaptation that was required (e.g. integrate increments.py into pyalmanac.py as Option 5) to create a PyPI (Python Package Index) edition making this original (non-PyPI) and the PyPI editions similar. Both editions create identical almanacs and the PyPI edition is the preferred choice for users. A double moonrise or moonset on the same day is now highlighted for better legibility. Event Time tables can now be generated - these are the tables containing data in hours:minutes:seconds, e.g. sunrise, sunset, moonrise, moonset and Meridian Passage. Accuracy to to the second of time is not required for navigational purposes, but may be used to compare accuracy with other algorithms. Some internal technical enhancements and minor changes to text are also included. The indication of objects (Sun or Moon) continuously above or below the horizon has been corrected. Regarding Moon Data: ".. .." has been added to indicate that the moonrise/moonset event occurs the following day (at the specified latitude). If there is no moonrise/moonset for two or more consecutive days, black boxes indicate "moon below horizon"; white boxes indicate "moon above horizon". This brings it in line with Nautical Almanacs. (Previously they were only displayed when there was no moonrise and no moonset on a single day.). Correction to Sun Data: "Sun continually above/below horizon" now shown if it applies to both Sunrise and Sunset, or additionally to both Civil Twilight Start & End; or additionally to both Astronomical Twilight Start & End, i.e. as two, four or six events per day and latitude. This brings it in line with Nautical Almanacs.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Pyalmanac has a low active ecosystem.
              It has 23 star(s) with 9 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              Pyalmanac has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of Pyalmanac is current.

            kandi-Quality Quality

              Pyalmanac has 0 bugs and 178 code smells.

            kandi-Security Security

              Pyalmanac has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              Pyalmanac code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              Pyalmanac is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              Pyalmanac releases are not available. You will need to build from source code and install.
              Pyalmanac has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions are available. Examples and code snippets are not available.
              Pyalmanac saves you 1012 person hours of effort in developing the same functionality from scratch.
              It has 3269 lines of code, 84 functions and 7 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed Pyalmanac and discovered the below as its top functions. This is intended to give you an instant insight into Pyalmanac implemented functionality, and help decide if they suit your requirements.
            • Generate LaTeX
            • Generate a latex table
            • Generates a string with all the inctabs
            • Get the inclination of aries
            • Make pdf file
            • Delete a PDF file
            • Clean up files
            • Make a table of tables
            • Generate the front page
            • Create a new page of the sun
            • Return a string representation of pages
            • Generate an almanac
            • Make nalw pages
            • Generate LaTeX table for sun and moon
            • Convert a datetime object into a time string
            • Make a sun calendar
            • Generate a new SUN
            • Generate the header of the news section
            • Page 2 page 2 page 2
            • Check if file exists
            • Convert filename to Unix format
            Get all kandi verified functions for this library.

            Pyalmanac Key Features

            No Key Features are available at this moment for Pyalmanac.

            Pyalmanac Examples and Code Snippets

            No Code Snippets are available at this moment for Pyalmanac.

            Community Discussions

            QUESTION

            WinUI list control that allows for dynamic item size, reordering, and virtualization
            Asked 2021-Jul-05 at 00:06

            I am trying to implement a document editor similar to Notion or Craft but in a WinUI/UWP application. Instead of using a "single-field" editor (like MS Word has), these apps show a vertical stack of content rows (so-called "blocks") that can contain text, media, link previews, LaTeX, etc. These rows can be rearranged with a :: handle on the side:

            So I've been looking for some list/stack control that:

            • Recycles the row views that are not visible (i.e. "virtualization" in the XAML terminology).
            • Allows to reorder rows by dragging and dropping them (single or multiple).
            • Automatically adjusts row heights based on their content growing or shrinking in height (due to the user's input or because the app's window resized horizontally and wrapped some content).

            Features I do not need: headers, columns, sorting, filtering. I have reviewed the following controls in WinUI 2.x and Windows Community Toolkit, but it looks like each of them lacks one or more of the required capabilities.

            ListView

            It seems to be the go-to control for the lists with drag'n'drop, but it can't resize the items dynamically. Also, its dragging uses the whole item area while I need to make it available only with a :: handle on the side.

            ItemsStackPanel

            A virtualization-supporting version of StackPanel, but, as far as I understand, panels are supposed to be used for simple layouting of child items and not for presenting long lists based on a data source.

            VariableSizedWrapGrid

            This is the only list/grid control that officially declares the support of variable-sized items, but at the same time, it does not support virtualization. However, I found a solution from 2013 that is based on pre-calculating the content size for invisible elements.

            ItemsRepeater

            A very basic control that does not provide virtualization on its own: "ItemsRepeater supports virtualization when attached to a host that supports virtualization."

            DataGrid

            A rather heavy control from WCT that seems to be the only one to dynamically resize cells depending on their content. Unfortunately, it does not allow row reordering (only sorting), so I can't use it either.

            Did I miss something? If not, I wonder which one would be the best to build upon. Thanks!

            ...

            ANSWER

            Answered 2021-Jun-30 at 06:55

            I have to say there is no control could fulfill all demands. In fact, the :: is used to control darg the specified item, you could achieve similar behavior in ListView control.

            The ListView allows you to easily reorder items inside a ListView by setting the CanReorderItems and AllowDrop properties to True.If you don’t want to allow the user to drag specific items, you could set the CanDragItems property to True, and add an event handler for the DragItemsStarting event. For the event handler, you can check any condition and then simply set the Cancel property of the event arguments to true if you want to cancel the dragging action. As follows:

            Xaml code:

            Source https://stackoverflow.com/questions/68183861

            QUESTION

            Getting the default document editor toolbar in Mac Catalyst
            Asked 2021-Feb-16 at 10:53

            I’ve just started porting my iPad app to the Mac using Catalyst. It’s a document editor and uses UIDocument. I’m trying to get the default toolbar behaviour for a document editor on macOS where there’s a dropdown to quickly name, tag, and move the document, and a subtitle that shows if the document has been edited. I can’t see any way to do this with Catalyst — is it possible?

            Thanks,

            Luke

            ...

            ANSWER

            Answered 2021-Feb-16 at 10:53

            A representative from Apple confirmed to me that this is not possible using Catalyst. In my opinion this makes Catalyst unsuitable for document based apps at the moment (Big Sur is currently the latest version of macOS).

            Source https://stackoverflow.com/questions/65614362

            QUESTION

            extract the edited text and hide the right side toolbar by default in syncfusion document editor component
            Asked 2020-Oct-29 at 11:34

            I am using ej2 sync fusion in my angular 7 application. How to extract the edited text in document editor component. and how to hide the right side toolbar on creation of the document editor component.

            ...

            ANSWER

            Answered 2020-Oct-29 at 11:34

            Reg. how to extract the edited text.

            To extract the whole document text in editor, you can either select the whole document by selectAll API from selection module and with text property from selection, you can get the selected text.

            Please refer the below sample code snippets

            //Selects the whole document.

            containerInstance.documentEditor.selection.selectAll()

            //To retrieve selected text

            containerInstance.documentEditor.selection.text

            You can also save the document as txt file in server-side and read the text file content to get the document text.

            Please refer the below documentation for saving the document content in server side

            https://ej2.syncfusion.com/angular/documentation/document-editor/export/#export-as-blob

            In the above documentation example, sample will be saved as RTF document. You can change the format to TXT and read the text content from text file.

            Reg. “how to hide the right-side toolbar on creation of the document editor component.”

            Yes, document editor provides option to hide the properties pane. Please set showPropertiesPane property to false in component wrapper

            Sample code snippet

            Source https://stackoverflow.com/questions/64552877

            QUESTION

            Google Drive API get AppProperties with API Key
            Asked 2020-Oct-01 at 12:28
            Question:

            Is it possible to access the appProperties field in a Google Drive document via an unauthenticated user (i.e., via API Key or other method rather than Oauth)?

            Background:

            I have an app that works as a live document editor. It authenticates users via OAuth and allows them to save those documents to their google drive, and later re-open them in my app (google file ids are saved in my database and will load the document text into my app). Create()-ing and Get()-ing these files works fine as long as the user is signed in, and I have the "appProperties" field storing a couple of additional key metadata items.

            As a next step, I would like to allow users to mark a document as "public view", and provide read-only access to their file, even for non-logged-in users. In my head, the flow would work as follows:

            1. User_A authenticates with OAuth and creates a document, saved to their google drive.
            2. User_A presses a button in my app, which sets the google document to a public sharing mode?
            3. App generates a "viewer" link that User_A can share with his friends.
            4. User_B does not have a Google account, but visits the "viewer link", and my app looks up the appropriate google document (using API key? since User_B is not logged in)
            5. Document is loaded into my app for viewing.

            This seems to mostly work; I can read the file metadata just fine using the API key, and even get the file contents. Side Note: Why do we need the API Key at all, given the quote on the google drive api page: "Note: Authorization optional."

            However, the "appProperties" field always returns empty when using the API key!

            Edit: After further searching I am just more confused. The closest answer I could find was from this related question here on stackoverflow:

            It's very simple. appPropperties is a private field and is available only to the application that added it.

            Based on this, it seems Google Drive is treating requests from my app API Key and requests from OAuth users on my app as two separate apps?

            Further, I would eventually like to allow users to collaborate on a single document, owned by one user. So instead of just providing a read-only "view" link, they could generate an "editor invitation" link that would allow an authenticated user (User_B gets a google account now) to be added as an authorized collaborator (but not simultaneous editing) on the original (User_A's) document. Is that even possible?

            Note I am using the Node.js google api.

            ...

            ANSWER

            Answered 2020-Oct-01 at 12:28
            This might be a bug:

            appProperties are app-specific properties attached to a file. Any call from this app should be able to access them. Therefore, I think calls from this app using an API key should be able to retrieve these properties.

            I could reproduce this behaviour: appProperties are populated when using OAuth, but not when using an API key, even though both are created from the same GCP project.

            I filed a bug:

            After researching this issue, I think this might be a bug. Therefore, I decided to file a bug on Issue Tracker:

            To anyone affected by this, I'd suggest to click the top-left star in order to keep track of this and to help prioritizing it.

            Reference:

            Source https://stackoverflow.com/questions/63889368

            QUESTION

            AvalonEdit: Getting Visual Position for IBackgroundRenderer
            Asked 2020-Jul-22 at 17:35

            In my AvalonEdit-based document editor, I am trying to add marker lines to the text view to indicate folds in the document, in a similar way to how Visual Studio joins the start and end of code block braces with dotted lines.

            I have something that produces the correct result if the document is scrolled to the very top, but it doesn't update correctly if the document is scrolled down. Specifically, the lines are drawn as if the text view wasn't scrolled at all, and was still at the top of the document. I suspect the problem has something to do with the TextViewPosition and GetVisualPosition lines, but I don't understand how to correctly get the adjusted visual position with scrolling.

            (To be clear, I have checked, and the Draw method is being called at the appropriate times to update the background, it's just that scrolling isn't accounted for when it does)

            What I have so far, is the following, on a class which implements IBackgroundRenderer:

            ...

            ANSWER

            Answered 2020-Jul-22 at 17:35

            GetVisualPosition is documented as:

            Returns: The position in WPF device-independent pixels relative to the top left corner of the document.

            To use it for painting, you'll want to subtract the scroll position from it:

            Source https://stackoverflow.com/questions/63022892

            QUESTION

            How to center object with CSS transform scale
            Asked 2020-Jun-17 at 07:26

            I'm trying to implement a zoom in/out functionality, just like you would have on a document editor like google docs or any word processor application. The problem I'm having is that I cannot keep the "document" centered and also be able to scroll all of its parts into view. Here is a small demonstration of the problem: https://codepen.io/liviu_vasut/pen/dyGbwwO

            ...

            ANSWER

            Answered 2020-Jun-02 at 09:47

            Actually, use the transform-origin: 0 0; and manually set the scrollbar to the center:

            Source https://stackoverflow.com/questions/62148727

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Pyalmanac

             Install Python 3.9.1 (should be in the system environment variable PATH, e.g. )   C:\Python39\Scripts;C:\Python39; .....  Install MiKTeX 21.1 from https://miktex.org/  When MiKTeX first runs it will require installation of additional packages.  Run Command Prompt as Administrator, go to your Python folder and execute, e.g.:.  cd C:\Python39  python.exe -m pip install --upgrade pip  ... for a first install:  pip3 uninstall pyephem ephem  pip3 install ephem  ... if already installed, check for upgrade explicitly:  pip3 install --upgrade ephem.  Put the Pyalmanac files in a new folder, run Command Prompt and start with:  py -3 pyalmanac.py.
             Ubuntu 19 and higher come with Python 3 preinstalled,  however pip may need to be installed:  sudo apt install python3-pip.  Install the following TeX Live package:  sudo apt install texlive-latex-extra.  Install the required astronomical library:  pip3 uninstall pyephem ephem  pip3 install ephem.  Put the Pyalmanac files in a folder and start with:  python3 pyalmanac.py.
             Every Mac comes with python preinstalled.  (Please choose this version of Pyalmanac if Python 3.* is installed.)  You need to install the Ephem library to use Pyalmanac.  Type the following commands at the commandline (terminal app):.  sudo easy_install pip  pip uninstall pyephem ephem  pip install ephem.  If this command fails, your Mac asks you if you would like to install the header files.  Do so - you do not need to install the full IDE - and try again.  Install TeX/LaTeX from http://www.tug.org/mactex/.  Now you are almost ready. Put the Pyalmanac files in any directory and start with:  python pyalmanac  or  ./pyalmanac.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/rodegerdts/Pyalmanac.git

          • CLI

            gh repo clone rodegerdts/Pyalmanac

          • sshUrl

            git@github.com:rodegerdts/Pyalmanac.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link