Skip to content
excelanoPublic

About

Three small OpenDocument viewers in Rust and egui: xodt for text documents, xods for spreadsheets, xodp for presentations

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

535 Commits

Folders and files

Repository files navigation

odox

Three small desktop applications that open an OpenDocument file, let you change what is in it, and save it back as the document it was. xodt is for text documents, xods for spreadsheets, xodp for presentations. Rust and egui, one binary each, nothing sent anywhere.

xodt report.odt
xods accounts.ods
xodp deck.odp

There is a launcher too, for a shell or a script that has a file and does not want to know which kind it is:

odox anything.ods

Why not just open it in LibreOffice

LibreOffice is an office suite and these are lightweight editors. xodt has a document on screen in a fraction of the time a suite takes to open it, from a download a small part of a suite's size, and reading a document you were sent, fixing a sentence in it and sending it on is most of what anyone does with one. The applications are also built to one standard rather than to compatibility with another program: what they implement is the OASIS OpenDocument specification, and a document that is valid ODF is a document they are meant to open, whichever application wrote it.

Editing covers what is basic to each kind of document and stops there: a feature a full suite needs and a quick edit does not stays out. You can type and delete text, change its font and size, make it bold, italic, underlined or struck through, align a paragraph, make it a heading or a list item and put a table or a picture in a text document, enter values and formulas in a spreadsheet and format its cells, move and resize the shapes on a slide and add or rearrange slides, undo any of that, and save. What you did not touch is written back as it was read, element for element, including the parts these applications have no opinion about: the document you save is the document you opened, with your change in it.

Install

On Debian or Ubuntu, from the Excelano apt repository, which is where updates come from:

curl -fsSL https://excelano.com/apt/setup.sh | sudo sh   # one-time
sudo apt install odox

odox is the launcher and it depends on the three applications, so that installs the whole suite. To take only the ones you want, name them instead — sudo apt install xods, say, and no application depends on another. amd64 and arm64 both.

From a clone, which is the same package the apt repository serves:

cargo build --release
./packaging/debian/build-deb.sh
sudo apt install ./dist/*.deb

Or from a clone without a package, which puts the binaries, the desktop entries and the icons under ~/.local so a file manager offers them:

cargo build --release
./packaging/linux/install.sh          # --default to open ODF files with them

A Rust toolchain builds all of it and nothing else is needed: no C compiler, no system libraries at build time, no code generator. Cargo.toml names the toolchain version the build needs.

https://excelano.com/odox/ is the product page for every platform. Windows and macOS are built and tested from this repository, and packaging/windows/README.md and packaging/macos/README.md say how each lane is run.

Using them

Give a document on the command line or press Ctrl+O. Ctrl+R re-reads the file from disk, Ctrl+W closes it, and Ctrl+plus, Ctrl+minus, Ctrl+0 and Ctrl with the mouse wheel change the zoom, where 100% is the document's printed size. A text document opens fitted to the width of the window and a presentation to the whole window, and each keeps fitting it until the zoom is changed by hand; Fit to the window in the View menu turns that back on. View > Formatting marks, or Ctrl+F10, shows in xodt and on a slide in xodp where each paragraph ends and where its spaces, no-break spaces, tabs and hand-made line breaks are, without moving anything; they are never exported.

Every menu is reached from the keyboard, except on macOS: Alt and a menu's underlined letter opens it, and an entry's underlined letter chooses it.

A window opens reading. Ctrl+E, or Edit mode in the Edit menu, turns editing on, and a preference in the same menu opens every document that way. Ctrl+S saves over the file you opened and Ctrl+Shift+S saves somewhere else; Ctrl+Z takes an edit back and Ctrl+Shift+Z puts it back. Closing, opening another document or quitting with changes unsaved asks first. Before a document is saved, what is about to be written is read back and compared with what is in the window, and a difference refuses the save rather than writing a document that would not come back the same. While a document has unsaved changes, a copy of them is kept every minute in odox/recovery under the data directory (~/.local/share on Linux, Library/Application Support on macOS, %LOCALAPPDATA% on Windows); if the window stops without closing, the next one of that application started without a file offers to open them, as the file they were made to, unsaved.

xodt shows the document as one continuous page at the width its page layout asks for, with the headings listed beside it; clicking one scrolls to it. The bar under the page counts the document's words and characters, and the selection's against them when there is one. In edit mode a click puts the caret where you clicked and you type into the page as it is drawn, formatting and all. Enter starts a new paragraph, Shift+Enter breaks the line, Backspace at the start of a paragraph joins it to the one before, and the arrows, Page Up and Page Down, Ctrl+Home and Ctrl+End, Ctrl+A, Shift and the clipboard work across paragraphs the way they do in any word processor. Copied text keeps its bold, italic, underline, strikethrough, headings and lists pasted back into the window, into another window, or into another program that reads HTML, and text copied from a browser or a word processor keeps the same pasted in. The row over the page begins with the font and the size: pick a font from the list, type a size and press Enter or pick one beside it, or step the size with Ctrl+] and Ctrl+[. Ctrl+B, Ctrl+I and Ctrl+U, or the buttons after them, make the selection bold, italic or underlined, or what you type next when nothing is selected; strikethrough is a button. The font colour and highlight buttons give the colour they last gave, and their arrows open a palette; Ctrl+Shift+P and Ctrl+Shift+B, or Format > Superscript and Subscript, raise or lower the selection. Next come the alignments, left, centered, right and justified, for the paragraphs the selection runs over, in xodt and on a slide alike, then indent buttons that step the left indent by a tab's width, a line spacing list of 1, 1.15, 1.5 and 2, and buttons that make the paragraphs the selection runs over body text, a heading of the first, second or third level, a bulleted list or a numbered one, and pressing a lit one takes it off. The Format menu offers the same commands, a heading of any level from 1 to 10 under Format > Heading, and in xodp the marks. Alt+Shift+Left and Alt+Shift+Right move every heading the selection runs over a level up or down, as Format > Promote heading and Demote heading do. Tab and Shift+Tab at the start of a list item move it a level in or out, and Format > Lists restarts a numbered list at the caret's item or continues it from the list before. A footnote's or an endnote's text shows beside its citation under the pointer or when the caret reaches it, and is edited there in edit mode; Ctrl+Alt+F, or Format > Footnote and Endnote, puts a new one at the caret, and the PDF puts footnotes at the foot of their page and endnotes at the end. Tracked changes are drawn in their authors' colours, insertions underlined and deletions struck through, and each one's author and date show beside it under the pointer; in edit mode it is accepted or rejected there, or all of them at once from the bar over the page. Edits made here are not tracked. A page's header and footer are drawn above and below the text and typed into like it; Format > Header and Format > Footer give the page one or take it away. Format > Field puts in a date, fixed or following the day, a page number or a page count, which the PDF fills in page by page. Ctrl+K, or Format > Link…, makes the selection a link to a web page, a mail address, or a heading or bookmark in the document, and with the caret in a link changes it or takes it off; xodp offers the deck's slides. A comment is marked in the margin, and its author, date and text show beside the mark under the pointer or when the caret reaches it; in edit mode its text is edited or deleted there, and Ctrl+Alt+C, or Format > Comment, puts a new one on the selection. In xodp a slide's comments are marked where they sit, and Slide > Comment adds one, and Slide > Text box and Slide > Picture… put a text box or a picture on the slide. Ctrl+Enter begins a page at the caret, drawn as a dashed rule in the window and taking effect in the PDF; Backspace at its start, or Format > Remove page break, takes it out. The Table button, or Format > Table, puts a table in after the caret's paragraph and puts in or takes out its rows and columns, merges the selected cells or splits a merged one, and evens out the column widths; in edit mode, drag the edge between two columns to resize them. Tab goes to the next cell, and in the last one adds a row. The Picture button, or Format > Insert a picture…, puts a PNG or a JPEG in after the caret's paragraph, once you have said what it shows or that it is decoration only. Format > Page setup… sets the paper, portrait or landscape and the margins, which is the width the page is drawn at and the pages an export makes. Undo puts the caret back where the edit was.

xods draws the sheet as a grid with the document's own column widths and cell styles, text wrapped where a cell says so, one tab per sheet, and shows the formula behind whichever cell you pick. Typing on the picked cell replaces it, Enter or F2 opens it with what it holds, Enter commits and moves down, Tab commits and moves right, Escape puts it back, and Delete clears it. What is typed is read in the cell's number format, so 15% in a percentage cell is fifteen percent and a date is a date, and what begins with = is a formula, worked out as soon as it is entered. A change works out again every formula that reads it; a formula calling a function xods does not evaluate keeps its last result, drawn faint, for the next spreadsheet application to work out. Sheet > Format cells…, or Ctrl+1, sets a number format, bold, italic and underline, a font color, a fill, alignment, wrapping and borders. Ctrl+D fills a selection down, and dragging the square at its corner carries a series on; Sheet > Sort… sorts a block by one of its columns, and Sheet > Comment… writes the picked cell's comment. Conditional formats colour a cell while their condition holds, and follow its value as it changes. A cell's validity rule is checked as a value is typed, pasted or filled into it: a value it refuses is not written, and one it warns about waits for OK. Pictures and shapes on a sheet are drawn over its cells and printed, and move with the cells they are anchored to when rows and columns are resized or hidden. Dragging, or Shift with the arrows, selects a range; Ctrl+C and Ctrl+X take it as tab separated text, as the cells show it, and as a table for a word processor, Ctrl+V puts such text down from the picked cell, as the values typing would make, and Delete empties it. A paste that reaches a cell under a merge changes nothing. The Sheet menu inserts rows or columns above, below, left or right of the selection, as many as it covers, and deletes the selected rows or columns; the formulas that name moved cells follow them. It says why when it will not: a merged cell it would cut through, a formula it cannot read or that points at a cell about to go, or something it does not move, such as a conditional format, a validation, a chart or a print range. The same menu, and a right click on a tab, add, rename, delete and move sheets; a double click on a tab renames it, and formulas that name a renamed sheet follow it. Dragging the edge of a column's or a row's header resizes it, and a double click on a column's fits it to its text. The Sheet menu hides the selected rows or columns and shows the hidden ones in or beside the selection, and merges the selection into one cell or unmerges the picked one. View > Freeze rows and columns keeps the rows above and the columns left of the picked cell in view. Ctrl and the arrows go to the edge of the data, Page Up and Page Down move a screen, Ctrl+Home and Ctrl+End go to the first and last used cells and Ctrl+A selects them, Shift with any of them stretching the selection; a selection's sum, average and count are shown above the grid. A screen reader can walk the cells in view as a grid, and says the picked cell as it moves.

xodp draws each slide at the size the document sets, with the speaker's notes under it. In edit mode a click picks one of the slide's shapes, a drag moves it, a drag on a corner resizes it, and a click on the text in one puts the caret there to type into it as in xodt, within that shape. The Slide menu, in edit mode, adds a slide after the one in view, with a title and a text frame where its master places them, duplicates the slide in view, deletes it (never the last one) or moves it a place earlier or later, each as one step to undo. F5 starts the slideshow at the first slide and Shift+F5 at the one in view: the slide fills the screen on black, Right, Down, Space, Enter or a click go forward, Left, Up, Backspace or a right click go back, and Escape ends it. Slides the deck hides are passed over, and a link to another slide goes to it. A slide whose shapes or paragraphs appear or leave click by click takes those clicks before the next slide, each effect shown at its end with no motion, and going back into a slide shows it as its last click left it. Page Down and Page Up go a whole slide, and Home and End to the first and the last. The notes are not shown.

A click on a link, in xodt and in the text of a slide in xodp, opens a web or mail address in the desktop's own browser or mail program, or in xodt scrolls to a bookmark or heading and in xodp goes to the slide the link names; while editing it takes Ctrl and a click, a plain click being the caret. No other kind of link is followed, whatever the document says.

File > Export as PDF/UA…, in any of the three, writes the document as a PDF that conforms to PDF/UA-1, the standard for accessible PDF: headings, lists, tables, links and pictures are tagged for a screen reader, and the fonts travel inside the file. The windows have no pages and the PDF does. A text document is laid out on the paper and margins its page style gives; a spreadsheet prints each sheet that is shown, its print range or the cells in use, across as many pages as it takes or fitted as its page style asks, with its header rows at the top of each; a presentation is a page per slide, without the slides the show skips or the speaker's notes. A picture that has neither alternative text nor a mark that it is decoration is asked about first, and what you answer is saved into the document, so the next export does not ask again.

In edit mode a word the dictionary for its language does not know has a red wave under it, and a right click on it offers what to put instead, Add to dictionary and Ignore. On Linux the dictionaries are the system's Hunspell ones (apt install hunspell-en-us, or hunspell-de-de and so on, or .aff and .dic files in ~/.local/share/hunspell); the Windows and macOS packages carry en_US and de_DE, under packaging/dictionaries with their licenses.

File > Print…, or Ctrl+P, prints the same pages, with nothing asked about the pictures. On Linux it opens the desktop's print dialog; where the desktop has none, and on Windows and macOS, the PDF opens in the default viewer, which prints it.

Ctrl+F opens a search bar in any of the three, in reading or in edit mode: Enter or F3 goes to the next match, Shift+Enter or Shift+F3 to the one before, and Escape closes it. The Aa and W toggles on the bar, or Alt+C and Alt+W, match case and whole words, and Replace follows them. Every match is lit, xodp searches the notes as well as the slides, and xods searches every sheet. In edit mode, and always in xods, Ctrl+H adds a row to replace the current match or every match, as one step to undo; xods replaces in cells that hold text and says how many it left, formulas and numbers among them.

File > New, or Ctrl+N, starts a blank document of the application's kind, in a new window when one is already open: a page of the paper your country prints on, a workbook with one sheet, or a deck with one wide slide and a title to type into. File > Open recent lists the last ten documents that application opened or saved, except on macOS, where the sandbox does not let it reopen one.

Each application opens one kind of file and says so when handed another, naming the sibling that reads it.

The window draws in the desktop's language where it has one. German is there; crates/odox-ui/po is where another goes.

Where things are

crates/odox-core reads and writes the format and has no window in it. crates/odox-ui is everything a person sees, shared by all three. crates/odox-fonts picks the face a document's font resolves to, for the window and the export alike, and crates/odox-pdf is the PDF/UA export. crates/xodt, crates/xods and crates/xodp are one screen each over that. crates/odox is the launcher, which draws nothing and links no toolkit. corpus/ holds the documents the tests read. packaging/ turns a build into something installable, one directory per platform. DESIGN.md is where every decision and its reasoning live; CLAUDE.md is the short guide for a session working here.

Warning

Do NOT submit odox, or a copy of it under another name, to the Mac App Store. Apple's App Review Guideline 4.3 treats copies of other apps as spam, and a 4.3 finding can flag the developer account that submitted it, so that every app the account sends afterwards is flagged too. Build it for your own Mac and keep it there.

License

MIT. See LICENSE.

About

Three small OpenDocument viewers in Rust and egui: xodt for text documents, xods for spreadsheets, xodp for presentations

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages