fsfe / reuse-tool

reuse is a tool for compliance with the REUSE recommendations.
https://reuse.software
399 stars 148 forks source link

OrgMode files can't be read by REUSE #908

Closed marcoXbresciani closed 8 months ago

marcoXbresciani commented 8 months ago

Hello, I have a bunch of text file in Emacs Org Mode format (.org file extension) and it seems REUSE Helper Tool (version 3.0.1) is not able to read their content.

An example file is

# © 2023-2024 Marco Bresciani
#
# Knowledge 枯山水 © 2023-2024 by Marco Bresciani is licensed under
# Attribution-ShareAlike 4.0 International.
#
# This is a freely licensed work, as explained in the Definition of Free
# Cultural Works.
#
# SPDX-FileCopyrightText: 2023-2024 Marco Bresciani
# SPDX-License-Identifier: CC-BY-SA-4.0

#+AUTHOR: Marco Bresciani
#+DATE: {{{modification-time(%Y-%m-%d)}}}
#+FILETAGS: :emacs:
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="other/style.css" />
#+LANGUAGE: en
#+TITLE: Emacs
# -*- mode: org; coding: utf-8-dos; -*-

Bit of random +weeds+ notes about things I'm learning for
[[file:emacs/emacs.org][Emacs]] and
[[file:emacs/orgmode/orgmode.org][OrgMode]].

#+INCLUDE: "footer.org" :minlevel 1 :only-contents t
# 枯山水

and running pipx run reuse --debug lint I see this message for the above file and all other files in the folder:

reuse.report - ERROR - Unexpected error occurred while parsing 'emacs.org'
debian.copyright.MachineReadableFormatError: invalid escape sequence: \b

but I'm not sure where is the problem.

I've tried to run pipx run reuse annotate --license="CC-BY-SA-4.0" --merge-copyrights --copyright-style=spdx emacs.org to have this result, so messing up the former content.

# © 2023 - 2024 Marco Bresciani
# © 2023 - 2024 by Marco Bresciani is licensed under
#
# SPDX-License-Identifier: CC-BY-SA-4.0

#+AUTHOR: Marco Bresciani
#+DATE: {{{modification-time(%Y-%m-%d)}}}
#+FILETAGS: :emacs:
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="other/style.css" />
#+LANGUAGE: en
#+TITLE: Emacs
# -*- mode: org; coding: utf-8-dos; -*-

Bit of random +weeds+ notes about things I'm learning for
[[file:emacs/emacs.org][Emacs]] and
[[file:emacs/orgmode/orgmode.org][OrgMode]].

#+INCLUDE: "footer.org" :minlevel 1 :only-contents t
# 枯山水

Not a big deal, actually, but still pipx run reuse lint does not recognize the file(s).

I've even tried to remove all Japanese characters and the copyright symbol, with no results.

carmenbianca commented 8 months ago

The error suggests to me that .reuse/dep5 contains errors. What are the file contents?

marcoXbresciani commented 8 months ago

Damn! Found The problem! Instead of using

Files: img/blue.svg
Copyright: 2024 Marco Bresciani
License: FSFAP

in the dep5 file, being in Windows I've used

Files: img\blue.svg
Copyright: 2024 Marco Bresciani
License: FSFAP

by habit, so everything exploded...